diff --git a/admin/prepare_test_release.sh b/admin/prepare_test_release.sh index 1ca829b14..2d0f13a27 100644 --- a/admin/prepare_test_release.sh +++ b/admin/prepare_test_release.sh @@ -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 @@ -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