Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Update APK names generated on taskcluster (#569)
Browse files Browse the repository at this point in the history
APK file names should now contain version code and stating builds should
now have staging in the name instead of release.
  • Loading branch information
bluemarvin authored and MortimerGoro committed Sep 25, 2018
1 parent 5576ce3 commit 2403029
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def getGitHash = { ->
}

android {
project.archivesBaseName = "FirefoxReality"
compileSdkVersion 27
defaultConfig {
applicationId "org.mozilla.vrbrowser"
Expand All @@ -33,6 +32,11 @@ android {
}
}
}
if (gradle.hasProperty('taskclusterBuild')) {
project.archivesBaseName = "FirefoxReality-$defaultConfig.versionName-$generatedVersionCode"
} else {
project.archivesBaseName = "FirefoxReality"
}
buildTypes {
release {
minifyEnabled true
Expand Down
8 changes: 6 additions & 2 deletions tools/taskcluster/sign_apk.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@
def main(name, argv):
token = ''
sign_url = 'https://autograph-edge.stage.mozaws.net/sign'
release = False
try:
opts, args = getopt.getopt(argv,"ht:r")
except getopt.GetoptError:
print name + '-s <key store file> -p <key store password file> -k <key password file> -a <key alias>'
print name + '-t <token file name> -r'
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
print name + '-t <token file name>'
print name + '-t <token file name> -r'
sys.exit()
elif opt in ("-t"):
token = arg
elif opt in ('-r'):
sign_url = 'https://autograph-edge.prod.mozaws.net/sign'
release = True

build_output_path = './app/build/outputs/apk'

Expand All @@ -38,6 +40,8 @@ def main(name, argv):
# Sign APKs
for apk in glob.glob(build_output_path + "/*/*/*-aligned.apk"):
print "Signing", apk
if not release:
apk = apk.replace('release', 'staging')
print subprocess.check_output([
"curl",
"-F", "input=@" + apk,
Expand Down

0 comments on commit 2403029

Please sign in to comment.