Skip to content

Commit

Permalink
Check the argument and auto commit the changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoconni committed Jun 25, 2022
1 parent 791edb7 commit 6e2660e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion admin/prepare_test_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# Modify the files for a test release 0.99.xx where xx is the value passed
# to the command line.

if [ -z "$1" ]; then
echo "Please provide a patch version number."
exit 1
fi

# Dummy version number
sed -ri "s/(PROJECT_VERSION_MAJOR\s\")([0-9]+)(.*)/\10\3/g" CMakeLists.txt
sed -ri "s/(PROJECT_VERSION_MINOR\s\")([0-9]+)(.*)/\199\3/g" CMakeLists.txt
Expand All @@ -12,4 +17,7 @@ sed -ri "s/secrets.PYPI/secrets.TESTPYPI/g" .github/workflows/cpp-python-build.y
sed -ri "s/upload dist/upload --repository testpypi dist/g" .github/workflows/cpp-python-build.yml

# Trigger a CodeQL review
sed -ri "s/branches:\s\[master\]/branches: \[master, release\/v1.1\]/g" .github/workflows/codeql-analysis.yml
sed -ri "s/branches:\s\[master\]/branches: \[master, test-release\/v0.99\]/g" .github/workflows/codeql-analysis.yml

# Commit the changes.
git commit -m "Prepare test release v0.99.$1" CMakeLists.txt JSBSim.vcxproj .github/workflows/cpp-python-build.yml .github/workflows/codeql-analysis.yml

0 comments on commit 6e2660e

Please sign in to comment.