File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # Extract Android version code
4- ANDROID_VERSION_CODE=$( grep " versionCode" app/build.gradle.kts | sed ' s/.*versionCode\s*=\s*\([0-9]*\).*/\1/' )
3+ # Extract Android version code as string
4+ ANDROID_VERSION_CODE=$( grep " versionCode" app/build.gradle.kts | sed ' s/.*versionCode\s*=\s*\([0-9]*\).*/\1/' | awk ' {print $0+0} ' )
55if [ -z " $ANDROID_VERSION_CODE " ]; then
66 echo " Error: Unable to extract version code."
77 exit 1
@@ -15,7 +15,7 @@ if [ -z "$ANDROID_VERSION_NAME" ]; then
1515fi
1616
1717# Write the extracted values to a temporary file
18- echo " ANDROID_VERSION_CODE: $ANDROID_VERSION_CODE " > extracted_values.txt
18+ echo " ANDROID_VERSION_CODE= $ANDROID_VERSION_CODE " > extracted_values.txt
1919echo " ANDROID_VERSION_NAME=$ANDROID_VERSION_NAME " >> extracted_values.txt
2020
2121# Debugging output to indicate script completion
You can’t perform that action at this time.
0 commit comments