Skip to content

Commit 7a4a5d5

Browse files
committed
Create adjust-release-branch.sh
1 parent 8fd1a08 commit 7a4a5d5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

scripts/adjust-release-branch.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
# Author: @ralfhandl
4+
5+
# Run this script from the root of the repo. It is designed to be run manually in a release branch.
6+
7+
branch=$(git branch --show-current)
8+
9+
if [[ ! $branch =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rel$ ]]; then
10+
echo "This script is intended to be run from a release branch, e.g. v3.1.2-rel"
11+
exit 1
12+
fi
13+
14+
vVersion=$(basename "$branch" "-rel")
15+
version=${vVersion:1}
16+
echo Prepare release of $version
17+
18+
cp EDITORS.md versions/$version-editors.md
19+
mv src/oas.md versions/$version.md
20+
rm -r src/schemas
21+
rm -r tests/schema

0 commit comments

Comments
 (0)