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

Side by Side Diff: build.py

Issue 29359878: Issue 4566 - Remove crashreporter check from adblockbrowser-build/build.py (Closed)
Patch Set: Created Oct. 25, 2016, 2:23 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 re 6 import re
7 import shutil 7 import shutil
8 import string 8 import string
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 15 matching lines...) Expand all
26 """).substitute({"name": os.path.basename(sys.argv[0])}) 26 """).substitute({"name": os.path.basename(sys.argv[0])})
27 27
28 28
29 def check_mozconfig(path, distribution_mode, build_mode): 29 def check_mozconfig(path, distribution_mode, build_mode):
30 if not os.path.exists(path): 30 if not os.path.exists(path):
31 raise Exception("'%s' doesn't exist, please create it." % path) 31 raise Exception("'%s' doesn't exist, please create it." % path)
32 32
33 with open(path) as file: 33 with open(path) as file:
34 contents = file.read() 34 contents = file.read()
35 35
36 # This check can be removed once https://issues.adblockplus.org/ticket/2490 is
37 # done.
38 if "--disable-crashreporter" not in contents:
39 raise Exception(
40 "'%s' doesn't seem to set --disable-crashreporter, please do." % pat h)
41
42 if "export MOZILLA_OFFICIAL=1" not in contents: 36 if "export MOZILLA_OFFICIAL=1" not in contents:
43 raise Exception( 37 raise Exception(
44 "'%s' doesn't seem to export MOZILLA_OFFICIAL=1, please do." % path) 38 "'%s' doesn't seem to export MOZILLA_OFFICIAL=1, please do." % path)
45 39
46 updater_disabled = "--disable-updater" in contents 40 updater_disabled = "--disable-updater" in contents
47 if updater_disabled and distribution_mode == "standalone": 41 if updater_disabled and distribution_mode == "standalone":
48 raise Exception("'%s' seems to set --disable-updater, please don't." % p ath) 42 raise Exception("'%s' seems to set --disable-updater, please don't." % p ath)
49 elif not updater_disabled and distribution_mode == "store": 43 elif not updater_disabled and distribution_mode == "store":
50 raise Exception( 44 raise Exception(
51 "'%s' doesn't seem to set --disable-updater, please do." % path) 45 "'%s' doesn't seem to set --disable-updater, please do." % path)
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 print >>sys.stderr, "Invalid build mode, check config.py" 131 print >>sys.stderr, "Invalid build mode, check config.py"
138 sys.exit(5) 132 sys.exit(5)
139 133
140 if do_build: 134 if do_build:
141 apk_path = build(distribution_mode, build_mode, config.ANDROID_SDK_PATH, 135 apk_path = build(distribution_mode, build_mode, config.ANDROID_SDK_PATH,
142 config.ANDROID_NDK_PATH) 136 config.ANDROID_NDK_PATH)
143 if do_sign: 137 if do_sign:
144 sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME) 138 sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME)
145 else: 139 else:
146 print apk_path 140 print apk_path
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld