Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/adjust-release-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Run this script from the root of the repo. It is designed to be run manually in a release branch.

branch=$(git branch --show-current)
today=$(date +%Y-%m-%d)

if [[ ! $branch =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rel$ ]]; then
echo "This script is intended to be run from a release branch, e.g. v3.1.2-rel"
Expand All @@ -16,7 +17,8 @@ version=${vVersion:1}
echo Prepare release of $version

cp EDITORS.md versions/$version-editors.md
mv src/oas.md versions/$version.md
sed "s/| TBD |/| $today |/g" src/oas.md > versions/$version.md
diff -w src/oas.md versions/$version.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this diff command for? Could you maybe a comment here to explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shows the lines that were changed by the sed command, which should only replace the "TBD" placeholder in the history table with the current (release) date. Just to be sure, and give the person preparing the release a hint if for some unfathomable reason the character sequence | TBD | appeared outside of the history table and should not have been changed.

rm -r src
rm -r tests/schema/pass tests/schema/fail
rm tests/schema/schema.test.mjs