From dd0be5e166e04570533eff39513709f42f48498f Mon Sep 17 00:00:00 2001 From: Nicolas Sebrecht Date: Mon, 9 Apr 2018 01:38:18 +0200 Subject: [PATCH] docs/website-doc.sh: limit the number of exported versions in _data/announces.yml Signed-off-by: Nicolas Sebrecht --- docs/website-doc.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/website-doc.sh b/docs/website-doc.sh index 8c01355..5dbe456 100755 --- a/docs/website-doc.sh +++ b/docs/website-doc.sh @@ -11,6 +11,7 @@ DOCBASE="${WEBSITE}/_doc" DESTBASE="${DOCBASE}/versions" VERSIONS_YML="${WEBSITE}/_data/versions.yml" ANNOUNCES_YML="${WEBSITE}/_data/announces.yml" +ANNOUNCES_YML_LIMIT=31 ANNOUNCES_YML_TMP="${ANNOUNCES_YML}.tmp" CONTRIB_YML="${WEBSITE}/_data/contribs.yml" CONTRIB="${DOCBASE}/contrib" @@ -122,7 +123,7 @@ function releases () { d="$(parse_releases_get_date "$title")" echo "- {date: '${d}', version: '${v}', link: 'Changelog.maint.html#${link}'}" done | tee -a "$ANNOUNCES_YML_TMP" - sort -nr "$ANNOUNCES_YML_TMP" >> "$ANNOUNCES_YML" + sort -nr "$ANNOUNCES_YML_TMP" | head -n $ANNOUNCES_YML_LIMIT >> "$ANNOUNCES_YML" rm -f "$ANNOUNCES_YML_TMP" }