ctbrec-5.3.2-experimental/update-version.sh

22 lines
416 B
Bash
Executable File

#!/bin/bash
# Usage: ./update-version.sh 1.2.3
NEW_VERSION=$1
if [[ -z "$NEW_VERSION" ]]; then
echo "Usage: $0 <new-version>"
exit 1
fi
pushd ./master
echo "Updating Maven project version to $NEW_VERSION..."
# Step 1: Update the parent POM and all modules
mvn versions:set -DnewVersion="$NEW_VERSION"
# Step 2: Commit changes
mvn versions:commit
echo "Version updated to $NEW_VERSION in all modules."
popd