Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbruhn committed Oct 5, 2014
1 parent 1798e05 commit 15017d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ script:
- "./gradlew build assembleRelease"
- if [ "$TRAVIS_BRANCH" = "develop" ]; then ./testfairy-upload.sh app/build/outputs/apk/app-release.apk; fi;
- python scripts/uploadApk.py de.happycarl.geotown.app alpha app/build/outputs/apk/app-release.apk
- if [ "$TRAVIS_TAG" ]; then python scripts/promoteApk.py de.happycarl.geotown.app production $TRAVIS_BUILD_NUMBER; fi;
- if [ "$TRAVIS_TAG" ]; then python scripts/promoteApk.py de.happycarl.geotown.app $TRAVIS_BUILD_NUMBER; fi;
env:
global:
- secure: WR7j7bQVR5IAvn4fR9xT5IyQglUxmmDj3ohzrSVmTwDCuHEo/QuZX5QxpJHIciSNUBDEiAIQYmtvYredIdoPk3W0s8d7PCYhMdiKgojs/dD65BfxiXDlEos7Y/seTO84m4M10MN0nnwTf8owzlO9FMQioLbDFzJUTQU9d3/wdCo=
Expand Down
14 changes: 10 additions & 4 deletions scripts/promoteApk.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
argparser = argparse.ArgumentParser(add_help=False)
argparser.add_argument('package_name',
help='The package name. Example: com.android.sample')
argparser.add_argument('track',
default='alpha',
help='The Track. production, beta, alpha')
argparser.add_argument('version',
help='The target version of the apk.')

Expand Down Expand Up @@ -55,13 +52,22 @@ def main():

track_response = service.edits().tracks().update(
editId=edit_id,
track=track,
track="production",
packageName=package_name,
body={u'versionCodes': [version_code]}).execute()

print 'Track %s is set for version code(s) %s' % (
track_response['track'], str(track_response['versionCodes']))

track_response2 = service.edits().tracks().update(
editId=edit_id,
track="alpha",
packageName=package_name,
body={u'versionCodes': []}).execute()

print 'Track %s is set for version code(s) %s' % (
track_response2['track'], str(track_response2['versionCodes']))

commit_request = service.edits().commit(
editId=edit_id, packageName=package_name).execute()
print 'Edit "%s" has been committed' % (commit_request['id'])
Expand Down

0 comments on commit 15017d8

Please sign in to comment.