2023-08-11 21:03:20 +01:00
default :
2024-07-22 21:14:27 +01:00
image : "gitlab.futo.org:5050/keyboard/latinime/gradle:latest"
2023-08-11 21:03:20 +01:00
2023-08-31 21:00:28 +01:00
variables :
GIT_SUBMODULE_STRATEGY : recursive
2023-08-31 21:01:50 +01:00
GIT_SUBMODULE_FORCE_HTTPS : "true"
2024-03-22 21:13:09 +00:00
GIT_STRATEGY : clone
GIT_DEPTH : 0
2023-08-31 21:00:28 +01:00
2023-08-11 21:03:20 +01:00
stages : # List of stages for jobs, and their order of execution
- build
build :
2024-07-22 21:20:41 +01:00
tags :
2024-07-22 21:40:09 +01:00
- docker
2023-08-11 21:03:20 +01:00
stage : build
2024-03-22 21:45:49 +00:00
before_script :
- git fetch origin master:master
2024-03-22 20:55:59 +00:00
- export VERSION_NAME=`git describe --tags --dirty`
2024-03-22 21:45:49 +00:00
- export VERSION_CODE=`git rev-list --first-parent --count master`
2024-03-22 21:16:28 +00:00
- echo $VERSION_CODE $VERSION_NAME
2023-08-31 20:48:35 +01:00
- ./setUpPropertiesCI.sh
2024-03-22 21:45:49 +00:00
script :
2024-04-12 00:06:26 +01:00
- gradle bundlePlaystoreRelease -s
- gradle assembleStableRelease -s
2024-05-31 23:31:44 +01:00
- if grep -q "android.permission.INTERNET" build/intermediates/merged_manifests/playstoreRelease/AndroidManifest.xml; then echo "Internet permission check failed for play store"; exit 1; fi
- if grep -q "android.permission.INTERNET" build/intermediates/merged_manifests/stableRelease/AndroidManifest.xml; then echo "Internet permission check failed for stable"; exit 1; fi
- echo "All checks OK"
- echo "Standalone permissions" && grep "uses-permission" build/intermediates/merged_manifests/stableRelease/AndroidManifest.xml
- echo "Play Store permissions" && grep "uses-permission" build/intermediates/merged_manifests/playstoreRelease/AndroidManifest.xml
2024-04-12 00:06:26 +01:00
- mv build/outputs/apk/stable/release/latinime-stable-release.apk ./keyboard-$VERSION_NAME.apk
- mv build/outputs/bundle/playstoreRelease/latinime-playstore-release.aab ./keyboard-playstore-$VERSION_NAME.aab
- touch VERSION_CODE_$VERSION_CODE.txt
- touch VERSION_NAME_$VERSION_NAME.txt
2024-03-22 20:55:59 +00:00
- echo "Keyboard $VERSION_NAME - https://gitlab.futo.org/alex/latinime/-/jobs/$CI_JOB_ID/artifacts/raw/keyboard-$VERSION_NAME.apk"
- echo $VERSION_CODE $VERSION_NAME
2024-07-23 15:21:22 +01:00
- ./uploadNightly.sh
2023-08-11 21:03:20 +01:00
artifacts :
2024-03-22 20:55:59 +00:00
name : "keyboard-$VERSION_NAME"
paths :
2023-08-11 21:03:20 +01:00
- ./*.apk
2024-04-12 00:06:26 +01:00
- ./*.aab
- ./*.txt
2023-08-11 21:03:20 +01:00
when : manual