Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: build_release.py

Issue 5385277551935488: Issue 2516 - Add a release build script (Closed)
Left Patch Set: Use check_call for ensure_dependencies.py Created May 19, 2015, 3:54 p.m.
Right Patch Set: Check for MOZILLA_OFFICIAL=1 Created May 19, 2015, 7:24 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 import glob 3 import glob
4 import json 4 import json
5 import os 5 import os
6 import shutil 6 import shutil
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 import tempfile 9 import tempfile
10 10
(...skipping 11 matching lines...) Expand all
22 raise Exception("'%s' doesn't exist, please create it." % path) 22 raise Exception("'%s' doesn't exist, please create it." % path)
23 23
24 with open(path) as file: 24 with open(path) as file:
25 contents = file.read() 25 contents = file.read()
26 26
27 # This check can be removed once https://issues.adblockplus.org/ticket/2490 is 27 # This check can be removed once https://issues.adblockplus.org/ticket/2490 is
28 # done. 28 # done.
29 if "--disable-crashreporter" not in contents: 29 if "--disable-crashreporter" not in contents:
30 raise Exception( 30 raise Exception(
31 "'%s' doesn't seem to set --disable-crashreporter, please do." % path) 31 "'%s' doesn't seem to set --disable-crashreporter, please do." % path)
32
33 if "export MOZILLA_OFFICIAL=1" not in contents:
34 raise Exception(
35 "'%s' doesn't seem to export MOZILLA_OFFICIAL=1, please do." % path)
32 36
33 updater_disabled = "--disable-updater" in contents 37 updater_disabled = "--disable-updater" in contents
34 if updater_disabled and mode == "devbuild": 38 if updater_disabled and mode == "devbuild":
35 raise Exception("'%s' seems to set --disable-updater, please don't." % path) 39 raise Exception("'%s' seems to set --disable-updater, please don't." % path)
36 elif not updater_disabled and mode == "release": 40 elif not updater_disabled and mode == "release":
37 raise Exception( 41 raise Exception(
38 "'%s' doesn't seem to set --disable-updater, please do." % path) 42 "'%s' doesn't seem to set --disable-updater, please do." % path)
39 43
40 def find_mozconfig(mode): 44 def find_mozconfig(mode):
41 mozconfig_path = os.path.join(BASE_DIR, ".mozconfig-" + mode) 45 mozconfig_path = os.path.join(BASE_DIR, ".mozconfig-" + mode)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 sys.exit(1) 86 sys.exit(1)
83 87
84 mode, key_store, key_name = sys.argv[1:] 88 mode, key_store, key_name = sys.argv[1:]
85 if mode not in ("devbuild", "release"): 89 if mode not in ("devbuild", "release"):
86 print_usage() 90 print_usage()
87 sys.exit(2) 91 sys.exit(2)
88 92
89 subprocess.check_call([ENSURE_DEPENDENCIES_PATH]) 93 subprocess.check_call([ENSURE_DEPENDENCIES_PATH])
90 apk_path = build(mode) 94 apk_path = build(mode)
91 sign(apk_path, key_store, key_name) 95 sign(apk_path, key_store, key_name)
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld