Create lane for F-Droid build and save all variants to release folder

This commit is contained in:
Julian Raufelder 2021-02-08 14:30:19 +01:00
parent 244a141363
commit 656276e991
No known key found for this signature in database
GPG Key ID: 17EE71F6634E381D
5 changed files with 40 additions and 1 deletions

1
.gitignore vendored
View File

@ -34,4 +34,3 @@ local.properties
**/fastlane/.env
**/fastlane/metadata/**/images/**
**/fastlane/report.xml
**/fastlane/latest_versions/**

View File

@ -41,6 +41,7 @@ platform :android do |options|
)
else
deployToServer(scheduled:options[:scheduled], beta:options[:beta])
deployToFDroid(scheduled:options[:scheduled], beta:options[:beta])
slack(
default_payloads: [], # reduce the notification to the minimum
@ -90,6 +91,8 @@ platform :android do |options|
skip_upload_screenshots: true,
metadata_path: "fastlane/metadata/android"
)
FileUtils.cp(lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], "release/Cryptomator-#{version}_playstore_signed.apk")
end
desc "Deploy new version to server"
@ -161,6 +164,30 @@ platform :android do |options|
latest_version_jsn.close
release_note_file.close
FileUtils.cp(lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], "release/Cryptomator-#{version}_signed.apk")
end
desc "Deploy new version to F-Droid"
lane :deployToFDroid do |options|
gradle(task: "clean")
gradle(
task: "assemble",
build_type: "Release",
flavor: "fdroid",
print_command: false,
properties: {
"android.injected.signing.store.file" => ENV["SIGNING_KEYSTORE_PATH"],
"android.injected.signing.store.password" => ENV["SIGNING_KEYSTORE_PASSWORD"],
"android.injected.signing.key.alias" => ENV["SIGNING_KEY_ALIAS"],
"android.injected.signing.key.password" => ENV["SIGNING_KEY_PASSWORD"],
}
)
FileUtils.cp(lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], "release/Cryptomator-#{version}_fdroid_signed.apk")
end
after_all do |lane|

View File

@ -26,6 +26,11 @@ Run all the tests
fastlane android deploy
```
Deploy new version to Google Play and APK Store options: beta:false scheduled:false (default)
### android deployToFDroid
```
fastlane android deployToFDroid
```
Deploy new version to F-Droid
----

4
fastlane/latest_versions/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

4
fastlane/release/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore