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

Unified Diff: build.py

Issue 29323540: Issue 2751 - Move signing options to config.py (Closed)
Patch Set: Created Aug. 13, 2015, 7:11 a.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
@@ -16,7 +16,7 @@
"obj-arm-linux-androideabi", "dist")
def print_usage():
- print >>sys.stderr, "Usage: %s devbuild|release KEY_STORE KEY_NAME" % \
+ print >>sys.stderr, "Usage: %s devbuild|release" % \
os.path.basename(sys.argv[0])
def check_mozconfig(path, mode):
@@ -48,12 +48,11 @@
check_mozconfig(mozconfig_path, mode)
return mozconfig_path
-def build(mode):
+def build(mode, sdk_path, ndk_path):
mozharness_environment = os.environ.copy()
mozharness_environment["MOZCONFIG"] = find_mozconfig(mode)
- import config
- mozharness_environment["ANDROID_SDK_PATH"] = config.ANDROID_SDK_PATH
- mozharness_environment["ANDROID_NDK_PATH"] = config.ANDROID_NDK_PATH
+ mozharness_environment["ANDROID_SDK_PATH"] = sdk_path
+ mozharness_environment["ANDROID_NDK_PATH"] = ndk_path
subprocess.check_call([MULTI_L10N_PATH, "--cfg", "adblockbrowser-cfg.py"],
env=mozharness_environment)
@@ -86,15 +85,16 @@
os.remove(temp_apk_path)
if __name__ == "__main__":
- if len(sys.argv) < 4:
+ if len(sys.argv) < 2:
print_usage()
sys.exit(1)
- mode, key_store, key_name = sys.argv[1:]
+ mode = sys.argv[1]
if mode not in ("devbuild", "release"):
print_usage()
sys.exit(2)
subprocess.check_call([ENSURE_DEPENDENCIES_PATH])
- apk_path = build(mode)
- sign(apk_path, key_store, key_name)
+ import config
+ apk_path = build(mode, config.ANDROID_SDK_PATH, config.ANDROID_NDK_PATH)
+ sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME)
« 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