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) |