2024-11-17 10:59:34 -05:00
|
|
|
#!/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
|
|
|
|
|
2024-11-19 05:14:53 -05:00
|
|
|
| **Version** | **Cut branch** | **Release date** | **End Of Life** |
|
|
|
|
| ----------- | -------------- | ---------------- | --------------- |
|
2024-11-17 10:59:34 -05:00
|
|
|
EOF
|
2024-11-19 05:14:53 -05:00
|
|
|
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
|
2024-11-17 10:59:34 -05:00
|
|
|
) >$dir/release-schedule.md
|