| LEFT | RIGHT |
| 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 Loading... |
| 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 Loading... |
| 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) |
| LEFT | RIGHT |