From e4a7e18157ad905c826438cf0674dc7d596e77d8 Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Sun, 6 Jan 2019 04:07:07 +0100 Subject: [PATCH] Update postbuild_rename_apk.cmd helper script --- postbuild_rename_apk.cmd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/postbuild_rename_apk.cmd b/postbuild_rename_apk.cmd index a30eaf61..b3697c98 100644 --- a/postbuild_rename_apk.cmd +++ b/postbuild_rename_apk.cmd @@ -17,18 +17,20 @@ REM SET PATH=%PATH%;"%GIT_INSTALL_DIR%\bin" REM REM Get "applicationId" -FOR /F "tokens=2 delims= " %%A IN ('type "app\build.gradle" 2^>^&1 ^| findstr "applicationId"') DO SET APPLICATION_ID=%%A +FOR /F "tokens=2 delims= " %%A IN ('type "%SCRIPT_PATH%app\build.gradle" 2^>^&1 ^| findstr "applicationId"') DO SET APPLICATION_ID=%%A SET APPLICATION_ID=%APPLICATION_ID:"=% echo [INFO] applicationId="%APPLICATION_ID%" REM REM Get "versionName" -FOR /F "tokens=2 delims= " %%A IN ('type "app\build.gradle" 2^>^&1 ^| findstr "versionName"') DO SET VERSION_NAME=%%A +FOR /F "tokens=2 delims= " %%A IN ('type "%SCRIPT_PATH%app\build.gradle" 2^>^&1 ^| findstr "versionName"') DO SET VERSION_NAME=%%A SET VERSION_NAME=%VERSION_NAME:"=% echo [INFO] versionName="%VERSION_NAME%" REM REM Get short hash of last commit. IF NOT EXIST %GIT_BIN% echo [ERROR] git.exe not found. & pause & goto :eof +pushd %SCRIPT_PATH% FOR /F "tokens=1" %%A IN ('git rev-parse --short --verify HEAD 2^>NUL:') DO SET COMMIT_SHORT_HASH=%%A +popd echo [INFO] commit="%COMMIT_SHORT_HASH%" REM REM Rename APK to be ready for upload to the GitHub release page.