0
0
Fork 0
mirror of https://codeberg.org/forgejo/docs.git synced 2024-11-22 17:48:39 -05:00
forgejo-docs/scripts/release-schedule.sh
Robert Wolff 5fbb96de9f admin: fix release schedule EOL dates (#936)
* all future release and EOL dates on Wednesdays
* v7 with EOL 2025

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/936
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Co-committed-by: Robert Wolff <mahlzahn@posteo.de>
2024-11-19 10:14:53 +00:00

32 lines
696 B
Bash
Executable file

#!/bin/bash
set -e
if ! which jq >/dev/null; then
apt-get install -qq -y jq
fi
dir=docs/admin
tag="<!-- lines below are replaced -->"
schedule="$(sed -e "/$tag/,20000d" <$dir/release-schedule.md)"
(
cat <<EOF
$schedule
$tag
| **Version** | **Cut branch** | **Release date** | **End Of Life** |
| ----------- | -------------- | ---------------- | --------------- |
EOF
jq --raw-output '
def date: .|strptime("%Y-%m-%d")|strftime("%e %B %Y");
def bold: "**\(.)**";
.[] | "| "
+ "\(.major).\(.minor)\(if .lts then " (LTS)" else "" end) |"
+ "\(.cut|date) |"
+ "\(.release|date) |"
+ "\(if .lts then .eol|date|bold else .eol|date end) |"
' release-schedule.json
) >$dir/release-schedule.md