change codemagic.yaml

This commit is contained in:
Peter Maquiran
2023-10-02 12:41:13 +01:00
parent 890d048cbb
commit 0e270563cc
+2 -15
View File
@@ -5,11 +5,8 @@ workflows:
environment:
android_signing:
- GabineteDigital
groups:
- google_play
vars:
PACKAGE_NAME: "com.gpr.gabinetedigital"
GOOGLE_PLAY_TRACK: alpha
node: latest
scripts:
- name: Install npm dependencies for Ionic Capacitor project
@@ -27,20 +24,10 @@ workflows:
ionic cap build android --prod
- name: Build Android release
script: |
LATEST_GOOGLE_PLAY_BUILD_NUMBER=$(google-play get-latest-build-number --package-name "$PACKAGE_NAME")
if [ -z $LATEST_GOOGLE_PLAY_BUILD_NUMBER ]; then
# fallback in case no build number was found from Google Play.
# Alternatively, you can `exit 1` to fail the build
# BUILD_NUMBER is a Codemagic built-in variable tracking the number
# of times this workflow has been built
UPDATED_BUILD_NUMBER=$BUILD_NUMBER
else
UPDATED_BUILD_NUMBER=$(($LATEST_GOOGLE_PLAY_BUILD_NUMBER + 1))
fi
cd android
./gradlew bundleRelease \
-PversionCode=$UPDATED_BUILD_NUMBER \
-PversionName=1.0.$UPDATED_BUILD_NUMBER
-PversionCode=1 \
-PversionName=1.0.0
artifacts:
- android/app/build/outputs/**/*.apk
publishing: