Skip to content

Commit

Permalink
refactored Fastfile, fixed travis config
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Apr 14, 2019
1 parent 5c7a39d commit 8ad3ac6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ad3ac6

Please sign in to comment.