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

Delta Between Two Patch Sets: abb-build/build.py

Issue 29989567: Issue 7238 - Fix multi-locale builds (Closed)
Left Patch Set: Adding l10n repo checkout Created Jan. 26, 2019, 12:31 a.m.
Right Patch Set: Adding hg pull if cant hg update Created Jan. 28, 2019, 5:21 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « abb-build/adblockbrowser-cfg.py ('k') | abb-build/mozconfig-common » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # This file is part of Adblock Plus <https://adblockplus.org/>, 2 # This file is part of Adblock Plus <https://adblockplus.org/>,
3 # Copyright (C) 2006-present eyeo GmbH 3 # Copyright (C) 2006-present eyeo GmbH
4 # 4 #
5 # Adblock Plus is free software: you can redistribute it and/or modify 5 # Adblock Plus is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License version 3 as 6 # it under the terms of the GNU General Public License version 3 as
7 # published by the Free Software Foundation. 7 # published by the Free Software Foundation.
8 # 8 #
9 # Adblock Plus is distributed in the hope that it will be useful, 9 # Adblock Plus is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 changesets = json.load(fd) 91 changesets = json.load(fd)
92 92
93 if not os.path.exists(_L10N_BASE_PATH): 93 if not os.path.exists(_L10N_BASE_PATH):
94 os.makedirs(_L10N_BASE_PATH) 94 os.makedirs(_L10N_BASE_PATH)
95 95
96 l10n_base_repo = "https://hg.mozilla.org/l10n-central/%s/" 96 l10n_base_repo = "https://hg.mozilla.org/l10n-central/%s/"
97 for locale in changesets.keys(): 97 for locale in changesets.keys():
98 revision = changesets[locale]["revision"] 98 revision = changesets[locale]["revision"]
99 repo_path = os.path.join(_L10N_BASE_PATH, locale) 99 repo_path = os.path.join(_L10N_BASE_PATH, locale)
100 if os.path.exists(repo_path): 100 if os.path.exists(repo_path):
101 subprocess.check_call(["hg", "up", "-r", revision], 101 update_cmd = ["hg", "up", "-r", revision]
102 cwd=repo_path) 102 if subprocess.call(update_cmd, cwd=repo_path):
103 subprocess.check_call(["hg", "pull"], cwd=repo_path)
104 subprocess.check_call(update_cmd, cwd=repo_path)
105
103 else: 106 else:
104 repo = l10n_base_repo % locale 107 repo = l10n_base_repo % locale
105 subprocess.check_call(["hg", "clone", repo, "-r", revision], 108 subprocess.check_call(["hg", "clone", repo, "-r", revision],
106 cwd=_L10N_BASE_PATH) 109 cwd=_L10N_BASE_PATH)
107 110
108 111
109 def _read_locales(): 112 def _read_locales():
110 with open(_MAEMO_LOCALES_PATH, "r") as fd: 113 with open(_MAEMO_LOCALES_PATH, "r") as fd:
111 lines = fd.readlines() 114 lines = fd.readlines()
112 115
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 sys.exit(6) 248 sys.exit(6)
246 249
247 if do_build: 250 if do_build:
248 apk_path = _build(architecture, distribution_mode, build_mode, 251 apk_path = _build(architecture, distribution_mode, build_mode,
249 config.ANDROID_SDK_PATH, config.ANDROID_NDK_PATH) 252 config.ANDROID_SDK_PATH, config.ANDROID_NDK_PATH)
250 if do_sign: 253 if do_sign:
251 _sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME, 254 _sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME,
252 config.ANDROID_SDK_PATH) 255 config.ANDROID_SDK_PATH)
253 else: 256 else:
254 print(apk_path) 257 print(apk_path)
LEFTRIGHT

Powered by Google App Engine
This is Rietveld