Skip to content
代码片段 群组 项目
提交 375ee34c 编辑于 作者: ling zhang's avatar ling zhang
浏览文件

build: #92 Try to get the version number from the APK

上级 e6dfb91a
No related branches found
No related tags found
无相关合并请求
......@@ -32,7 +32,7 @@ build-android:
stage: deploy
script:
- flutter build apk --dart-define=REQUEST_ENV=prod_env
- /opt/android-sdk-linux/build-tools/30.0.3/aapt2 dump badging build/app/outputs/flutter-apk/app-release.apk | grep "versionName" | sed -e "s/.*versionName='//" -e "s/' .*//"
- export VERSION_APK=$(/opt/android-sdk-linux/build-tools/30.0.3/aapt2 dump badging build/app/outputs/flutter-apk/app-release.apk | grep "versionName" | sed -e "s/.*versionName='//" -e "s/' .*//")
build-ios:
extends: check
......@@ -44,7 +44,7 @@ build-ios:
upload-apk:
stage: deploy
script:
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/app/outputs/flutter-apk/app-release.apk "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/jihu-gitlab-app/0.0.1/app-release.apk"'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/app/outputs/flutter-apk/app-release.apk "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/jihu-gitlab-app/${VERSION_APK}/app-release.apk"'
needs: [build-android]
only:
- main
\ No newline at end of file
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册