#!/bin/bash # Usage: ./update-version.sh 25.08.29 INPUT_VERSION=$1 if [[ -z "$INPUT_VERSION" ]]; then echo "Usage: $0 " exit 1 fi # Convert to Launch4j-safe version IFS='.' read -r YY MM DD <<< "$INPUT_VERSION" YY=$((10#$YY)) MM=$((10#$MM)) DD=$((10#$DD)) SAFE_VERSION="${YY}.${MM}.${DD}" echo "Updating Maven project version to $SAFE_VERSION..." pushd ./master || exit 1 # Step 1: Update the parent POM and all modules mvn versions:set -DnewVersion="$SAFE_VERSION" # Step 2: Commit changes mvn versions:commit echo "Version updated to $SAFE_VERSION in all modules." popd || exit 1