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

Unified Diff: build.py

Issue 29325912: Issue 2986 - Move distribution_mode to config.py (Closed)
Patch Set: Created Sept. 3, 2015, 6:32 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | config.py.sample » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build.py
===================================================================
--- a/build.py
+++ b/build.py
@@ -18,9 +18,9 @@
def print_usage():
print >>sys.stderr, string.Template("""\
-Usage: $name build devbuild|release standalone|store
+Usage: $name build devbuild|release
$name sign APK_PATH
- $name build-and-sign devbuild|release standalone|store\
+ $name build-and-sign devbuild|release\
""").substitute({"name": os.path.basename(sys.argv[0])})
def check_mozconfig(path, distribution_mode):
@@ -105,10 +105,6 @@
if build_mode not in ("devbuild", "release"):
print_usage()
sys.exit(3)
- distribution_mode = len(sys.argv) > 3 and sys.argv[3] or ""
- if distribution_mode not in ("standalone", "store"):
- print_usage()
- sys.exit(4)
if do_sign:
apk_path = sys.argv[2]
@@ -116,6 +112,11 @@
subprocess.check_call([ENSURE_DEPENDENCIES_PATH])
import config
+ distribution_mode = config.DISTRIBUTION_MODE
+ if distribution_mode not in ("standalone", "store"):
+ print >>sys.stderr, "Invalid distribution mode, check config.py"
+ sys.exit(4)
+
if do_build:
apk_path = build(build_mode, distribution_mode, config.ANDROID_SDK_PATH,
config.ANDROID_NDK_PATH)
« no previous file with comments | « no previous file | config.py.sample » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld