Skip to content

Commit

Permalink
MISC: mknews.sh: print latest NEWS.md version with `misc/mknews.sh --…
Browse files Browse the repository at this point in the history
…version`

Signed-off-by: Tim Janik <[email protected]>
  • Loading branch information
tim-janik committed Sep 6, 2023
1 parent ea5b283 commit 3db0bb1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions misc/mknews.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ fetch_news_version() # fetch_news_version {1|2}
"
sed -nre "$SEDSCRIPT" "${ABSPATHSCRIPT%/*}"/../NEWS.md
}
NEWS_TAG="v$(fetch_news_version 1)"

# Produce assets/NEWS.md
# Just print topmost NEWS.md version
test " ${1:-}" == " --version" && {
echo "$NEWS_TAG"
exit 0
}

# When generating news for release tags...
if RELEASETAG=$(git describe --match='v[0-9]*.[0-9]*.[0-9]*' --exact-match 2>/dev/null) ; then
Expand All @@ -36,7 +41,6 @@ if RELEASETAG=$(git describe --match='v[0-9]*.[0-9]*.[0-9]*' --exact-match 2>/de
else
# Generate pre-release news from git history
CURRENT_VERSION=$("${ABSPATHSCRIPT%/*}"/version.sh | (read v h d && echo $v))
NEWS_TAG="v$(fetch_news_version 1)"
echo "## Anklang $CURRENT_VERSION"
echo
echo 'Development version - may contain bugs or compatibility issues.'
Expand Down

0 comments on commit 3db0bb1

Please sign in to comment.