diff --git a/.travis.yml b/.travis.yml index 9dd0dba..cb2106d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,13 +34,14 @@ before_deploy: - openssl aes-256-cbc -K $encrypted_c39c3bebf85c_key -iv $encrypted_c39c3bebf85c_iv -in fastlane/api-8546008605074111507-287154-450dc77b365f.json.enc -out fastlane/api-8546008605074111507-287154-450dc77b365f.json -d - env RELEASE=true make aw-server-rust # RUSTFLAGS=-g # The RUSTFLAGS=-g is to keep debug symbols in the build, bloats the binary from 7M -> 60MB. Currently using profile.release.debug in Cargo.toml however as -g didn't work on the first try - make aw-webui - - sed -i "s/versionName.*/versionName \"$(echo $TRAVIS_TAG_NAME | tail -c +2 -)\"/g" mobile/build.gradle # Sets versionName, tail used to skip "v" at start of tag name + - sed -i "s/versionName \".*\"/versionName \"$(echo $TRAVIS_TAG | tail -c +2 -)\"/g" mobile/build.gradle # Sets versionName, tail used to skip "v" at start of tag name + - env SUPPLY_TRACK=production bundle exec fastlane update_version - bash scripts/build_apk.sh deploy: # Production version - provider: script - script: bundle exec fastlane supply run --track beta --apk aw-android*.apk + script: bundle exec fastlane supply run --apk aw-android*.apk --track production skip_cleanup: true on: tags: true diff --git a/fastlane/Fastfile b/fastlane/Fastfile index a829ef7..e35f8f9 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -30,12 +30,16 @@ platform :android do # You can also use other beta testing services here end - desc "Deploy a new version to the Google Play" - lane :deploy do + desc "Update versionCode to be one higher than the latest on Play Store" + lane :update_version do increment_version_code( gradle_file_path: "mobile/build.gradle", version_code: google_play_track_version_codes.max + 1 ) + end + + desc "Deploy a new version to the Google Play" + lane :deploy do gradle(task: "clean assembleRelease") upload_to_play_store end diff --git a/fastlane/README.md b/fastlane/README.md index 739a20b..0c131ab 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -26,6 +26,11 @@ Runs all the tests fastlane android beta ``` Submit a new Beta Build to Crashlytics Beta +### android update_version +``` +fastlane android update_version +``` + ### android deploy ``` fastlane android deploy