website-doc.sh: fix link in announces.yml

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2016-07-22 17:57:24 +02:00
parent e02f1491c9
commit 436e82531b

View File

@ -79,7 +79,7 @@ function parse_releases_get_link () {
# $1: full release title # $1: full release title
# #
function parse_releases_get_version () { function parse_releases_get_version () {
echo $title | sed -r -e 's,^### [a-Z]+ (v[^ ]+).*,\1,' echo $1 | sed -r -e 's,^### [a-Z]+ (v[^ ]+).*,\1,'
} }
# #
@ -87,7 +87,7 @@ function parse_releases_get_version () {
# $1: full release title # $1: full release title
# #
function parse_releases_get_date () { function parse_releases_get_date () {
echo $title | sed -r -e 's,.*\(([0-9]+-[0-9]+-[0-9]+)\),\1,' echo $1 | sed -r -e 's,.*\(([0-9]+-[0-9]+-[0-9]+).*,\1,'
} }
# #
@ -107,17 +107,17 @@ function releases () {
# Announces for the mainline. # Announces for the mainline.
grep -E '^### OfflineIMAP' ./Changelog.md | while read title grep -E '^### OfflineIMAP' ./Changelog.md | while read title
do do
link="$(parse_releases_get_link $title)" link="$(parse_releases_get_link "$title")"
v="$(parse_releases_get_version $title)" v="$(parse_releases_get_version "$title")"
d="$(parse_releases_get_date $title)" d="$(parse_releases_get_date "$title")"
echo "- {date: '${d}', version: '${v}', link: 'Changelog.html#${link}'}" echo "- {date: '${d}', version: '${v}', link: 'Changelog.html#${link}'}"
done | tee -a "$ANNOUNCES_YML_TMP" done | tee -a "$ANNOUNCES_YML_TMP"
# Announces for the maintenance releases. # Announces for the maintenance releases.
grep -E '^### OfflineIMAP' ./Changelog.maint.md | while read title grep -E '^### OfflineIMAP' ./Changelog.maint.md | while read title
do do
link="$(parse_releases_get_link $title)" link="$(parse_releases_get_link "$title")"
v="$(parse_releases_get_version $title)" v="$(parse_releases_get_version "$title")"
d="$(parse_releases_get_date $title)" d="$(parse_releases_get_date "$title")"
echo "- {date: '${d}', version: '${v}', link: 'Changelog.maint.html#${link}'}" echo "- {date: '${d}', version: '${v}', link: 'Changelog.maint.html#${link}'}"
done | tee -a "$ANNOUNCES_YML_TMP" done | tee -a "$ANNOUNCES_YML_TMP"
sort -nr "$ANNOUNCES_YML_TMP" >> "$ANNOUNCES_YML" sort -nr "$ANNOUNCES_YML_TMP" >> "$ANNOUNCES_YML"