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

Side by Side Diff: abb-build/build.py

Issue 29631219: Issue 4105 - [build] Make it possible to build arbitrary ABB revisions (Closed)
Patch Set: Created Dec. 5, 2017, 3:04 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | abb-build/dependencies » ('j') | dependencies » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # This file is part of Adblock Plus <https://adblockplus.org/>, 3 # This file is part of Adblock Plus <https://adblockplus.org/>,
4 # Copyright (C) 2006-present eyeo GmbH 4 # Copyright (C) 2006-present eyeo GmbH
5 # 5 #
6 # Adblock Plus is free software: you can redistribute it and/or modify 6 # Adblock Plus is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License version 3 as 7 # it under the terms of the GNU General Public License version 3 as
8 # published by the Free Software Foundation. 8 # published by the Free Software Foundation.
9 # 9 #
10 # Adblock Plus is distributed in the hope that it will be useful, 10 # Adblock Plus is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details. 13 # GNU General Public License for more details.
14 # 14 #
15 # You should have received a copy of the GNU General Public License 15 # You should have received a copy of the GNU General Public License
16 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 16 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
17 17
18 import glob 18 import glob
19 import json 19 import json
20 import os 20 import os
21 import re 21 import re
22 import shutil 22 import shutil
23 import string 23 import string
24 import subprocess 24 import subprocess
25 import sys 25 import sys
26 import tempfile 26 import tempfile
27 27
28 _BASE_DIR = os.path.dirname(os.path.abspath(__file__)) 28 _BASE_DIR = os.path.dirname(os.path.abspath(__file__))
29 _ENSURE_DEPENDENCIES_PATH = os.path.join(_BASE_DIR, "ensure_dependencies.py") 29 _ABB_PATH = os.path.normpath(os.path.join(_BASE_DIR, ".."))
30 _ENSURE_DEPENDENCIES_PATH = os.path.join(_ABB_PATH, "ensure_dependencies.py")
30 _GENERATED_PATH = os.path.join(_BASE_DIR, "generated") 31 _GENERATED_PATH = os.path.join(_BASE_DIR, "generated")
31 _GENERATED_MOZCONFIG_PATH = os.path.join(_GENERATED_PATH, "mozconfig") 32 _GENERATED_MOZCONFIG_PATH = os.path.join(_GENERATED_PATH, "mozconfig")
32 _MOZCONFIG_COMMON_PATH = os.path.join(_BASE_DIR, "mozconfig-common") 33 _MOZCONFIG_COMMON_PATH = os.path.join(_BASE_DIR, "mozconfig-common")
33 _MOZCONFIG_ARM_PATH = os.path.join(_BASE_DIR, "mozconfig-arm") 34 _MOZCONFIG_ARM_PATH = os.path.join(_BASE_DIR, "mozconfig-arm")
34 _MOZCONFIG_X86_PATH = os.path.join(_BASE_DIR, "mozconfig-x86") 35 _MOZCONFIG_X86_PATH = os.path.join(_BASE_DIR, "mozconfig-x86")
35 _MOZCONFIG_STORE_PATH = os.path.join(_BASE_DIR, "mozconfig-store") 36 _MOZCONFIG_STORE_PATH = os.path.join(_BASE_DIR, "mozconfig-store")
36 _MOZCONFIG_RELEASE_PATH = os.path.join(_BASE_DIR, "mozconfig-release") 37 _MOZCONFIG_RELEASE_PATH = os.path.join(_BASE_DIR, "mozconfig-release")
37 _MOZCONFIG_CUSTOM_PATH = os.path.join(_BASE_DIR, "mozconfig-custom") 38 _MOZCONFIG_CUSTOM_PATH = os.path.join(_BASE_DIR, "mozconfig-custom")
38 _MULTI_L10N_PATH = os.path.join(_BASE_DIR, "mozharness", "scripts", 39 _MULTI_L10N_PATH = os.path.join(_BASE_DIR, "mozharness", "scripts",
39 "multil10n.py") 40 "multil10n.py")
40 _ABB_PATH = os.path.normpath(os.path.join(_BASE_DIR, "..")) 41
41 _CMD_BUILD = "build" 42 _CMD_BUILD = "build"
42 _CMD_SIGN = "sign" 43 _CMD_SIGN = "sign"
43 _CMD_BUILD_SIGN = "build-and-sign" 44 _CMD_BUILD_SIGN = "build-and-sign"
44 _ARCH_ARM = "arm" 45 _ARCH_ARM = "arm"
45 _ARCH_X86 = "x86" 46 _ARCH_X86 = "x86"
46 _ARCH_X86_I386 = "i386" 47 _ARCH_X86_I386 = "i386"
47 _ARCHS = (_ARCH_ARM, _ARCH_X86) 48 _ARCHS = (_ARCH_ARM, _ARCH_X86)
48 _DIST_STANDALONE = "standalone" 49 _DIST_STANDALONE = "standalone"
49 _DIST_STORE = "store" 50 _DIST_STORE = "store"
50 _DIST_MODES = (_DIST_STANDALONE, _DIST_STORE) 51 _DIST_MODES = (_DIST_STANDALONE, _DIST_STORE)
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 sys.exit(6) 181 sys.exit(6)
181 182
182 if do_build: 183 if do_build:
183 apk_path = _build(architecture, distribution_mode, build_mode, 184 apk_path = _build(architecture, distribution_mode, build_mode,
184 config.ANDROID_SDK_PATH, config.ANDROID_NDK_PATH) 185 config.ANDROID_SDK_PATH, config.ANDROID_NDK_PATH)
185 if do_sign: 186 if do_sign:
186 _sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME, 187 _sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME,
187 config.ANDROID_SDK_PATH) 188 config.ANDROID_SDK_PATH)
188 else: 189 else:
189 print apk_path 190 print apk_path
OLDNEW
« no previous file with comments | « no previous file | abb-build/dependencies » ('j') | dependencies » ('J')

Powered by Google App Engine
This is Rietveld