Merge branch 'soru/cleaner-e2ee-stuff' into 'master'
update CI to better do with / without olm See merge request ChristianPauly/fluffychat-flutter!145
This commit is contained in:
commit
763ca1f49b
|
@ -28,9 +28,10 @@ build_web:
|
||||||
- sudo apt update
|
- sudo apt update
|
||||||
- sudo apt install curl -y
|
- sudo apt install curl -y
|
||||||
- rm -r assets/js/package
|
- rm -r assets/js/package
|
||||||
- cd assets/js/ && curl -L 'https://gitlab.com/famedly/libraries/olm/-/jobs/artifacts/master/download?job=build_js' > olm.zip && cd ../../
|
# enable olm AFTER we move website out of USA
|
||||||
- cd assets/js/ && unzip olm.zip && cd ../../
|
# - cd assets/js/ && curl -L 'https://gitlab.com/famedly/libraries/olm/-/jobs/artifacts/master/download?job=build_js' > olm.zip && cd ../../
|
||||||
- cd assets/js/ && rm olm.zip && cd ../../
|
# - cd assets/js/ && unzip olm.zip && cd ../../
|
||||||
|
# - cd assets/js/ && rm olm.zip && cd ../../
|
||||||
- cd assets/js/ && mv javascript package && cd ../../
|
- cd assets/js/ && mv javascript package && cd ../../
|
||||||
- cd web/ && rm sql-wasm.js sql-wasm.wasm && cd ../
|
- cd web/ && rm sql-wasm.js sql-wasm.wasm && cd ../
|
||||||
- cd web/ && curl -L 'https://github.com/sql-js/sql.js/releases/latest/download/sqljs-wasm.zip' > sqljs-wasm.zip && cd ../
|
- cd web/ && curl -L 'https://github.com/sql-js/sql.js/releases/latest/download/sqljs-wasm.zip' > sqljs-wasm.zip && cd ../
|
||||||
|
@ -39,14 +40,16 @@ build_web:
|
||||||
- flutter pub get
|
- flutter pub get
|
||||||
- flutter clean
|
- flutter clean
|
||||||
- flutter build web --release --verbose
|
- flutter build web --release --verbose
|
||||||
|
# TODO: upload elsewhere
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- build/web/
|
- build/web/
|
||||||
|
|
||||||
|
|
||||||
build_android_debug:
|
build_android_debug_no_olm:
|
||||||
stage: coverage
|
stage: coverage
|
||||||
script:
|
script:
|
||||||
|
- sed -i 's/^\s*flutter_olm.*/#&/' pubspec.yaml
|
||||||
- truncate -s $(head -n -2 android/app/build.gradle | wc -c) android/app/build.gradle
|
- truncate -s $(head -n -2 android/app/build.gradle | wc -c) android/app/build.gradle
|
||||||
- flutter build apk --debug -v
|
- flutter build apk --debug -v
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -67,10 +70,34 @@ build_android_apk:
|
||||||
- cd android && echo "storeFile=../key.jks" >> key.properties && cd ..
|
- cd android && echo "storeFile=../key.jks" >> key.properties && cd ..
|
||||||
- cd android/app && echo $GOOGLE_SERVICES >> google-services.json && cd ../..
|
- cd android/app && echo $GOOGLE_SERVICES >> google-services.json && cd ../..
|
||||||
- flutter build apk --release
|
- flutter build apk --release
|
||||||
|
- mkdir -p build/with-olm
|
||||||
|
- cp build/app/outputs/apk/release/app-release.apk build/with-olm/
|
||||||
artifacts:
|
artifacts:
|
||||||
when: on_success
|
when: on_success
|
||||||
paths:
|
paths:
|
||||||
- build/app/outputs/apk/release/app-release.apk
|
- build/with-olm/app-release.apk
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
- tags
|
||||||
|
|
||||||
|
|
||||||
|
build_android_apk_no_olm:
|
||||||
|
stage: coverage
|
||||||
|
script:
|
||||||
|
- sed -i 's/^\s*flutter_olm.*/#&/' pubspec.yaml
|
||||||
|
- cd android && echo $FDROID_KEY | base64 --decode --ignore-garbage > key.jks && cd ..
|
||||||
|
- cd android && echo "storePassword=${FDROID_KEY_PASS}" >> key.properties && cd ..
|
||||||
|
- cd android && echo "keyPassword=${FDROID_KEY_PASS}" >> key.properties && cd ..
|
||||||
|
- cd android && echo "keyAlias=key" >> key.properties && cd ..
|
||||||
|
- cd android && echo "storeFile=../key.jks" >> key.properties && cd ..
|
||||||
|
- cd android/app && echo $GOOGLE_SERVICES >> google-services.json && cd ../..
|
||||||
|
- flutter build apk --release
|
||||||
|
- mkdir -p build/without-olm
|
||||||
|
- cp build/app/outputs/apk/release/app-release.apk build/without-olm/
|
||||||
|
artifacts:
|
||||||
|
when: on_success
|
||||||
|
paths:
|
||||||
|
- build/without-olm/app-release.apk
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- tags
|
- tags
|
||||||
|
@ -86,10 +113,33 @@ build_android_appbundle:
|
||||||
- cd android && echo "storeFile=../key.jks" >> key.properties && cd ..
|
- cd android && echo "storeFile=../key.jks" >> key.properties && cd ..
|
||||||
- cd android/app && echo $GOOGLE_SERVICES >> google-services.json && cd ../..
|
- cd android/app && echo $GOOGLE_SERVICES >> google-services.json && cd ../..
|
||||||
- flutter build appbundle --target-platform android-arm,android-arm64,android-x64
|
- flutter build appbundle --target-platform android-arm,android-arm64,android-x64
|
||||||
|
- mkdir -p build/with-olm
|
||||||
|
- cp build/app/outputs/bundle/release/app-release.aab build/with-olm/
|
||||||
artifacts:
|
artifacts:
|
||||||
when: on_success
|
when: on_success
|
||||||
paths:
|
paths:
|
||||||
- build/app/outputs/bundle/release/app-release.aab
|
- build/with-olm/app-release.aab
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
|
|
||||||
|
build_android_appbundle_no_olm:
|
||||||
|
stage: coverage
|
||||||
|
script:
|
||||||
|
- sed -i 's/^\s*flutter_olm.*/#&/' pubspec.yaml
|
||||||
|
- cd android && echo $FDROID_KEY | base64 --decode --ignore-garbage > key.jks && cd ..
|
||||||
|
- cd android && echo "storePassword=${FDROID_KEY_PASS}" >> key.properties && cd ..
|
||||||
|
- cd android && echo "keyPassword=${FDROID_KEY_PASS}" >> key.properties && cd ..
|
||||||
|
- cd android && echo "keyAlias=key" >> key.properties && cd ..
|
||||||
|
- cd android && echo "storeFile=../key.jks" >> key.properties && cd ..
|
||||||
|
- cd android/app && echo $GOOGLE_SERVICES >> google-services.json && cd ../..
|
||||||
|
- flutter build appbundle --target-platform android-arm,android-arm64,android-x64
|
||||||
|
- mkdir -p build/without-olm
|
||||||
|
- cp build/app/outputs/bundle/release/app-release.aab build/without-olm/
|
||||||
|
artifacts:
|
||||||
|
when: on_success
|
||||||
|
paths:
|
||||||
|
- build/without-olm/app-release.aab
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
@ -117,8 +167,11 @@ upload_to_fdroid_repo:
|
||||||
- chmod 700 ~/.ssh
|
- chmod 700 ~/.ssh
|
||||||
script:
|
script:
|
||||||
- export UPDATE_VERSION=$(pcregrep -o1 'version:\\s([0-9]*\\.[0-9]*\\.[0-9]*)\\+[0-9]*' pubspec.yaml)
|
- export UPDATE_VERSION=$(pcregrep -o1 'version:\\s([0-9]*\\.[0-9]*\\.[0-9]*)\\+[0-9]*' pubspec.yaml)
|
||||||
|
- mkdir -p upload
|
||||||
|
- cp build/with-olm/* upload/
|
||||||
|
- cd build/with-olm/
|
||||||
- mv app-release.apk "${UPDATE_VERSION}.apk"
|
- mv app-release.apk "${UPDATE_VERSION}.apk"
|
||||||
- cd build/app/outputs/apk/release/ && rsync -rav -e ssh ./ fluffy@fdroid.nordgedanken.dev:/fdroid/repo
|
- rsync -rav -e ssh ./ fluffy@fdroid.nordgedanken.dev:/fdroid/repo
|
||||||
- ssh fluffy@fdroid.nordgedanken.dev "cd fdroid && fdroid update"
|
- ssh fluffy@fdroid.nordgedanken.dev "cd fdroid && fdroid update"
|
||||||
dependencies:
|
dependencies:
|
||||||
- build_android_apk
|
- build_android_apk
|
||||||
|
|
|
@ -276,6 +276,13 @@ packages:
|
||||||
url: "https://github.com/Sorunome/flutter_matrix_html"
|
url: "https://github.com/Sorunome/flutter_matrix_html"
|
||||||
source: git
|
source: git
|
||||||
version: "0.1.2"
|
version: "0.1.2"
|
||||||
|
flutter_olm:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_olm
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.1"
|
||||||
flutter_plugin_android_lifecycle:
|
flutter_plugin_android_lifecycle:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -62,7 +62,7 @@ dependencies:
|
||||||
sqlite3: ^0.1.4
|
sqlite3: ^0.1.4
|
||||||
random_string: ^2.0.1
|
random_string: ^2.0.1
|
||||||
flutter_typeahead: ^1.8.1
|
flutter_typeahead: ^1.8.1
|
||||||
#flutter_olm: ^1.0.1
|
flutter_olm: ^1.0.1
|
||||||
intl: ^0.16.0
|
intl: ^0.16.0
|
||||||
intl_translation: ^0.17.9
|
intl_translation: ^0.17.9
|
||||||
flutter_localizations:
|
flutter_localizations:
|
||||||
|
|
Loading…
Reference in a new issue