drone inject build date and ver; tar linux

This commit is contained in:
Dan Ballard 2021-05-31 15:34:45 -07:00
parent 40bc2a46e3
commit 7c10be2e8c
1 changed files with 17 additions and 10 deletions

View File

@ -53,13 +53,17 @@ steps:
- name: deps
path: /root/.pub-cache
commands:
- flutter build linux
- flutter build linux --dart-define BUILD_VER=`cat VERSION` --dart-define BUILD_DATE=`cat BUILDDATE`
- mkdir deploy/linux
- cp -r build/linux/x64/release/bundle/* deploy/linux
- cp linux/cwtch.desktop deploy/linux
- cp linux/cwtch.png deploy/linux
- cp linux/libCwtch.so deploy/linux/lib/
- cp /sdks/flutter/bin/cache/artifacts/engine/linux-x64/icudtl.dat deploy/linux
- cd deploy
- mv linux cwtch
- tar -czf cwtch-`cat VERSION`.tzr.gz cwtch
- rm -r cwtch
- name: build-android
image: cirrusci/flutter:dev
@ -77,13 +81,12 @@ steps:
- echo $upload_jks_file_b64 > upload-keystore.jks.b64
- base64 -i --decode upload-keystore.jks.b64 > android/app/upload-keystore.jks
- sed -i "s/%jks-password%/$upload_jks_pass/g" android/key.properties
- flutter build appbundle
- flutter build appbundle --dart-define BUILD_VER=`cat VERSION` --dart-define BUILD_DATE=`cat BUILDDATE`
# cant do debug for final release, this is just a stop gap
- flutter build apk
- flutter build apk --dart-define BUILD_VER=`cat VERSION` --dart-define BUILD_DATE=`cat BUILDDATE`
# or build apk --split-per-abi ?
- mkdir deploy/android
- cp build/app/outputs/bundle/release/app-release.aab deploy/android
- cp build/app/outputs/apk/release/app-release.apk deploy/android
- cp build/app/outputs/bundle/release/app-release.aab deploy/
- cp build/app/outputs/apk/release/app-release.apk deploy/
#- cp build/app/outputs/flutter-apk/app-debug.apk deploy/android
- name: widget-tests
@ -209,16 +212,20 @@ steps:
image: openpriv/flutter-desktop:windows-beta
commands:
- flutter pub get
- flutter build windows
# flwtch-`cat VERSION`-`cat BUILDDATE`
- $Env:buildname = 'flwtch-win-'
- $Env:buildname += type .\VERSION
- $Env:version += type .\VERSION
- $Env:buildname += $Env:version
- $Env:buildname += '-'
- $Env:buildname += type .\BUILDDATE
- $Env:builddate += type .\BUILDDATE
- $Env:buildname += $Env:builddate
- $Env:builddir += $Env:buildname
- $Env:zip = 'flwtch.zip'
- $Env:zip = 'cwtch-`
- $Env:zip += $Env:version
- $Env:zip += '.zip'
- $Env:sha = $Env:zip
- $Env:sha += '.sha512'
- flutter build windows --dart-define BUILD_VER=$Env:version --dart-define BUILD_DATE=$Env:builddate
- mkdir deploy
- move build\\windows\\runner\\Release $Env:builddir
- copy windows\libCwtch.dll $Env:builddir