From eea397ed85bcbfbf5abe5f7a2b1d974e107c82e0 Mon Sep 17 00:00:00 2001 From: Automatic Release Builder Date: Mon, 26 Oct 2020 09:29:23 +0000 Subject: [PATCH] Make set-version.sh handle new naming Now we renamed simgear-version and flightgear-version, this script needed to get smarter. --- release_builder/set-version.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/release_builder/set-version.sh b/release_builder/set-version.sh index 7064ca7..7430275 100755 --- a/release_builder/set-version.sh +++ b/release_builder/set-version.sh @@ -33,9 +33,9 @@ MICRO_VERSION=${VERSION_A[2]} setVersionTo() { local V="$1" - echo "setting version to $V" - echo "$V" > flightgear-version - git add flightgear-version + echo "setting version to $V in $2" + echo "$V" > $2 + git add $2 echo "new version: $V" | git commit --file=- git tag "version/$V" } @@ -43,9 +43,22 @@ setVersionTo() { while [ $# -gt 0 ]; do echo "Processing $1" pushd $1 > /dev/null + + case $1 in + flightgear) + versionFileName="flightgear-version" + ;; + simgear) + versionFileName="simgear-version" + ;; + *) + versionFileName="version" + ;; + esac + git config user.name "Automatic Release Builder" git config user.email "build@flightgear.org" - setVersionTo "${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}" + setVersionTo "${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}" $versionFileName popd > /dev/null shift done