mirror of
https://github.com/yogeshpaliyal/KeyPass.git
synced 2026-01-04 09:39:56 -06:00
Update versionBump.sh
This commit is contained in:
committed by
GitHub
parent
c1391ab266
commit
36c164ea4c
@@ -4,8 +4,8 @@ INCREMENT_MODE=$1 # major, minor, and patch
|
||||
RELEASE_NOTES=$2 # String files
|
||||
|
||||
# Read the current versionCode and versionName from the build.gradle.kts.kts file
|
||||
VERSION_CODE=$(grep "versionCode" app/build.gradle.kts | awk '{print $2}' | tr -d '\r''"')
|
||||
VERSION_NAME=$(grep "versionName" app/build.gradle.kts | awk '{print $2}' | tr -d '\r''"')
|
||||
VERSION_CODE=$(grep "versionCode =" app/build.gradle.kts | awk '{print $2}' | tr -d '\r''"')
|
||||
VERSION_NAME=$(grep "versionName =" app/build.gradle.kts | awk '{print $2}' | tr -d '\r''"')
|
||||
|
||||
|
||||
# Split the versionName into major, minor, and patch numbers
|
||||
@@ -30,8 +30,8 @@ NEW_VERSION_CODE=$((VERSION_CODE + 1))
|
||||
NEW_VERSION_NAME="$MAJOR.$MINOR.$PATCH"
|
||||
|
||||
# Update the build.gradle.kts.kts file with the new versionCode and versionName values
|
||||
sed -i "s/versionCode $VERSION_CODE/versionCode $NEW_VERSION_CODE/" app/build.gradle
|
||||
sed -i "s/versionName \"$VERSION_NAME\"/versionName \"$NEW_VERSION_NAME\"/" app/build.gradle
|
||||
sed -i "s/versionCode = $VERSION_CODE/versionCode = $NEW_VERSION_CODE/" app/build.gradle.kts
|
||||
sed -i "s/versionName = \"$VERSION_NAME\"/versionName = \"$NEW_VERSION_NAME\"/" app/build.gradle.kts
|
||||
|
||||
# Output the new versionCode and versionName values
|
||||
#echo "New versionCode: $NEW_VERSION_CODE"
|
||||
|
||||
Reference in New Issue
Block a user