website-doc.sh: include maintenance releases in the list of announces
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
744974584a
commit
344cc07f7a
@ -62,6 +62,25 @@ function api () {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Return title from release entry.
|
||||||
|
# $1: full release title
|
||||||
|
#
|
||||||
|
function parse_releases_get_link () {
|
||||||
|
echo $1 | sed -r -e 's,^### (OfflineIMAP.*)\),\1,'
|
||||||
|
| tr '[:upper:]' '[:lower:]' \
|
||||||
|
| sed -r -e 's,[\.("],,g' \
|
||||||
|
| sed -r -e 's, ,-,g'
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Return version from release entry.
|
||||||
|
# $1: full release title
|
||||||
|
#
|
||||||
|
function parse_releases_get_version () {
|
||||||
|
echo $title | sed -r -e 's,^### [a-Z]+ (v[^ ]+).*,\1,'
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make Changelog public and save links to them as JSON.
|
# Make Changelog public and save links to them as JSON.
|
||||||
#
|
#
|
||||||
@ -76,18 +95,20 @@ function releases () {
|
|||||||
# - {version: '<version>', link: '<link>'}
|
# - {version: '<version>', link: '<link>'}
|
||||||
# - ...
|
# - ...
|
||||||
echo "$HEADER" > "$ANNOUNCES_YML"
|
echo "$HEADER" > "$ANNOUNCES_YML"
|
||||||
|
# Announces for the mainline.
|
||||||
grep -E '^### OfflineIMAP' ./Changelog.md | while read title
|
grep -E '^### OfflineIMAP' ./Changelog.md | while read title
|
||||||
do
|
do
|
||||||
link="$(echo $title | sed -r -e 's,^### (OfflineIMAP.*)\),\1,' \
|
link="$(parse_releases_get_link $title)"
|
||||||
| tr '[:upper:]' '[:lower:]' \
|
v="$(parse_releases_get_version $title)"
|
||||||
| sed -r -e 's,[\.("],,g' \
|
|
||||||
| sed -r -e 's, ,-,g'
|
|
||||||
)"
|
|
||||||
v="$(echo $title \
|
|
||||||
| sed -r -e 's,^### [a-Z]+ (v[^ ]+).*,\1,'
|
|
||||||
)"
|
|
||||||
echo "- {version: '${v}', link: 'Changelog.html#${link}'}"
|
echo "- {version: '${v}', link: 'Changelog.html#${link}'}"
|
||||||
done | tee -a "$ANNOUNCES_YML"
|
done | tee -a "$ANNOUNCES_YML"
|
||||||
|
# Announces for the maintenance releases.
|
||||||
|
grep -E '^### OfflineIMAP' ./Changelog.maint.md | while read title
|
||||||
|
do
|
||||||
|
link="$(parse_releases_get_link $title)"
|
||||||
|
v="$(parse_releases_get_version $title)"
|
||||||
|
echo "- {version: '${v}', link: 'Changelog.maint.html#${link}'}"
|
||||||
|
done | tee -a "$ANNOUNCES_YML"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user