Skip to content

Commit

Permalink
contrib: Add a script for updating upgrade notes
Browse files Browse the repository at this point in the history
[upstream commit 6ec4c80]

It's intended to be used in the release process.

Signed-off-by: Anna Kapuscinska <[email protected]>
  • Loading branch information
lambdanis committed Jun 5, 2024
1 parent a919af9 commit fbf1542
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions contrib/update-upgrade-notes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -ex

if [ -z "$1" ] || [[ ! $1 =~ ^v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
echo "USAGE: ./contrib/update-upgrade-notes.sh vX.Y.Z"
exit 1
fi

NOTES_DIR="${NOTES_DIR:-contrib/upgrade-notes}"
version=$1

# Copy the latest upgrade notes to a version-specific file and create new latest from the template.
# Skip for pre-releases.
if [[ ! "$version" == *"-"* ]]; then
cp "$NOTES_DIR/latest.md" "$NOTES_DIR/$version.md"
cp "$NOTES_DIR/template.md" "$NOTES_DIR/latest.md"
fi

0 comments on commit fbf1542

Please sign in to comment.