From a084ec6090f222ebccccc6a8132bb77e5980fd5f Mon Sep 17 00:00:00 2001 From: gtxtreme Date: Mon, 14 Feb 2022 21:59:01 +0530 Subject: [PATCH] Change order of generating tag and versionCode bump --- scripts/actions/generate_new_version_code.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/actions/generate_new_version_code.sh b/scripts/actions/generate_new_version_code.sh index 23a10688..680487bc 100755 --- a/scripts/actions/generate_new_version_code.sh +++ b/scripts/actions/generate_new_version_code.sh @@ -13,10 +13,7 @@ else exit 1 fi -echo "Updating CurrentVersionCode by 1" -let "currentVersionCode=currentVersionCode+1" # Bumping versionCode By one -sed -i 's/versionCode [0-9A-Za-z]*/versionCode '$currentVersionCode'/' $GITHUB_WORKSPACE/app/app.gradle echo "New Version Code:$currentVersionCode" echo "Version Name: $currentVersionName" @@ -24,3 +21,10 @@ new_tag="v$currentVersionName($currentVersionCode)" # New tag becomes v1.0(3) echo "New Tag: $new_tag" echo "NEW_TAG=$new_tag" >> $GITHUB_ENV # Setting this for use later +echo "Updating CurrentVersionCode by 1 and changing file versionCode" + +let "currentVersionCode=currentVersionCode+1" # Bumping versionCode By one +sed -i 's/versionCode [0-9A-Za-z]*/versionCode '$currentVersionCode'/' $GITHUB_WORKSPACE/app/app.gradle + + +