Skip to content

Commit

Permalink
Publish version flavour in one go
Browse files Browse the repository at this point in the history
  • Loading branch information
garethbowen committed Nov 18, 2020
1 parent 5377975 commit 0d1a6f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ jobs:
script: make test

- stage: alpha
script:
- fastlane deploy flavor:unbrandedWebview
- fastlane deploy flavor:unbrandedXwalk
script: fastlane deploy flavor:unbranded

- stage: deploy
# flavors sorted alphabetically with three per job
Expand Down
13 changes: 7 additions & 6 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ default_platform(:android)
platform :android do
desc "Build and deploy on Google Play"
lane :deploy do |options|
gradleTaskName = "assemble#{options[:flavor]}Release"
version = ENV['TRAVIS_TAG'].empty? ? 'SNAPSHOT' : ENV['TRAVIS_TAG']
brand = options[:flavor].replace("Webview", "").replace("Xwalk", "")
package_name = brand == 'unbranded' ? "org.medicmobile.webapp.mobile" : "org.medicmobile.webapp.mobile.#{brand}"
package_name = options[:flavor] == 'unbranded' ? "org.medicmobile.webapp.mobile" : "org.medicmobile.webapp.mobile.#{options[:flavor]}"

gradle(task: gradleTaskName)
gradle(task: "assemble#{options[:flavor]}WebviewRelease")
gradle(task: "assemble#{options[:flavor]}XwalkRelease")

supply(
package_name: package_name,
track: "alpha",
json_key: "playstore-secret.json",
apk_paths: [
"build/outputs/apk/#{options[:flavor]}/release/medic-android-#{version}-#{options[:flavor]}-arm64-v8a-release.apk",
"build/outputs/apk/#{options[:flavor]}/release/medic-android-#{version}-#{options[:flavor]}-armeabi-v7a-release.apk",
"build/outputs/apk/#{options[:flavor]}Webview/release/medic-android-#{version}-#{options[:flavor]}-webview-arm64-v8a-release.apk",
"build/outputs/apk/#{options[:flavor]}Webview/release/medic-android-#{version}-#{options[:flavor]}-webview-armeabi-v7a-release.apk",
"build/outputs/apk/#{options[:flavor]}Xwalk/release/medic-android-#{version}-#{options[:flavor]}-xwalk-arm64-v8a-release.apk",
"build/outputs/apk/#{options[:flavor]}Xwalk/release/medic-android-#{version}-#{options[:flavor]}-xwalk-armeabi-v7a-release.apk",
],
skip_upload_aab: true,
skip_upload_metadata: true,
Expand Down

0 comments on commit 0d1a6f0

Please sign in to comment.