File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,9 @@ source /usr/local/bin/.app-deploy-sources/__constants.sh
55# ################################
66
77function __generate_app_version_from_apk {
8+ APP_PATH=" $1 "
89 CI_BUILD_NUMBER=$2
9- APK_MANIFEST=$( aapt dump badging $1 )
10+ APK_MANIFEST=$( aapt dump badging " ${APP_PATH} " )
1011 VERSION_NAME=$( echo " $APK_MANIFEST " | sed -n " s/.*versionName='\([^']*\).*/\1/p" )
1112 VERSION_CODE=$( echo " $APK_MANIFEST " | sed -n " s/.*versionCode='\([^']*\).*/\1/p" )
1213
@@ -18,16 +19,19 @@ function __generate_app_version_from_apk {
1819}
1920
2021function __generate_app_version_from_aab {
22+
23+ APP_PATH=" $1 "
24+ CI_BUILD_NUMBER=$2
25+
2126 temp_path=$PWD
2227 bundletool=" ${temp_path} /bundletool.jar"
2328 source=" https://github.com/google/bundletool/releases/download/${BUNDLE_TOOL_VERSION} /bundletool-all-1.17.2.jar"
2429
2530 wget -q -nv " ${source} " --output-document=" ${bundletool} " &
2631 wait
27- APK_MANIFEST=$( exec java -jar " ${bundletool} " dump manifest --bundle $ APP_PATH &
32+ APK_MANIFEST=$( exec java -jar " ${bundletool} " dump manifest --bundle " ${ APP_PATH} " &
2833 wait)
2934
30- CI_BUILD_NUMBER=$2
3135 VERSION_CODE=$( echo " $APK_MANIFEST " | sed -n " s/.*versionCode=\" \([^\" ]*\).*/\1/p" )
3236 VERSION_NAME=$( echo " $APK_MANIFEST " | sed -n " s/.*versionName=\" \([^\" ]*\).*/\1/p" )
3337
Original file line number Diff line number Diff line change 55function __generate_app_version_from_ipa {
66
77 # Get file names
8- APP_PATH=$1
8+ APP_PATH=" $1 "
99 CI_BUILD_NUMBER=$2
10- FILE_NAME=$( basename $APP_PATH )
1110
1211 # Unzip ipa file
13- unzip -q $ APP_PATH -d .tmp
12+ unzip -q " ${ APP_PATH} " -d .tmp
1413
1514 # Read info .plist
1615 INFO_PLIST=.tmp/Payload/** /Info.plist
You can’t perform that action at this time.
0 commit comments