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

Commit a703d5b

Browse files
authored
Update signing script to print server error to log (#3005)
1 parent 17864e8 commit a703d5b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tools/taskcluster/sign_apk.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,15 @@ def main(name, argv):
8787
print subprocess.check_output(["zipalign", "-f", "-v", "-p", "4", orig, target])
8888

8989
print "Verifying", target
90-
print subprocess.check_output(['apksigner', 'verify', '--verbose', target])
90+
try:
91+
print subprocess.check_output(['apksigner', 'verify', '--verbose', target])
92+
except subprocess.CalledProcessError as err:
93+
print "Verifying apk failed"
94+
fileinfo = subprocess.check_output(['file', target])
95+
if fileinfo.find("ASCII text") != -1:
96+
print 'Error returned from autograph:'
97+
print subprocess.check_output(['cat', target])
98+
sys.exit(err.returncode)
9199
print "Archiving", target
92100
os.rename(target, artifacts_path + "/" + os.path.basename(target))
93101
print "=" * 80

0 commit comments

Comments
 (0)