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

Delta Between Two Patch Sets: build.py

Issue 29399743: Issue 3768 - Check (and fix, if needed) multilocale builds (Closed)
Left Patch Set: Created March 31, 2017, 9:34 a.m.
Right Patch Set: Removed unrelated change and updated ABB dependency Created April 3, 2017, 4:19 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 | « adblockbrowser-cfg.py ('k') | dependencies » ('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 2
3 import glob 3 import glob
4 import json 4 import json
5 import os 5 import os
6 import re 6 import re
7 import shutil 7 import shutil
8 import string 8 import string
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 print >>sys.stderr, string.Template("""\ 44 print >>sys.stderr, string.Template("""\
45 Usage: $name %s 45 Usage: $name %s
46 $name %s APK_PATH 46 $name %s APK_PATH
47 $name %s\ 47 $name %s\
48 """ % (_CMD_BUILD, _CMD_SIGN, 48 """ % (_CMD_BUILD, _CMD_SIGN,
49 _CMD_BUILD_SIGN)).substitute({"name": os.path.basename(sys.argv[0])}) 49 _CMD_BUILD_SIGN)).substitute({"name": os.path.basename(sys.argv[0])})
50 50
51 51
52 def _generate_mozconfig(architecture, distribution_mode, build_mode): 52 def _generate_mozconfig(architecture, distribution_mode, build_mode):
53 if not os.path.exists(_GENERATED_PATH): 53 if not os.path.exists(_GENERATED_PATH):
54 os.makedirs(_GENERATED_PATH) 54 os.makedirs(_GENERATED_PATH)
anton 2017/04/03 06:28:11 i had to figure this out when trying to build it a
55 with open(_GENERATED_MOZCONFIG_PATH, "w+") as mozconfig: 55 with open(_GENERATED_MOZCONFIG_PATH, "w+") as mozconfig:
56 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_COMMON_PATH) 56 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_COMMON_PATH)
57 if architecture == _ARCH_X86: 57 if architecture == _ARCH_X86:
58 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_X86_PATH) 58 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_X86_PATH)
59 else: 59 else:
60 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_ARM_PATH) 60 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_ARM_PATH)
61 if distribution_mode == _DIST_STORE: 61 if distribution_mode == _DIST_STORE:
62 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_STORE_PATH) 62 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_STORE_PATH)
63 if build_mode == _BUILD_RELEASE: 63 if build_mode == _BUILD_RELEASE:
64 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_RELEASE_PATH) 64 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_RELEASE_PATH)
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 build_mode = config.BUILD_MODE 147 build_mode = config.BUILD_MODE
148 if build_mode not in _BUILD_MODES: 148 if build_mode not in _BUILD_MODES:
149 print >>sys.stderr, error_msg % ( 149 print >>sys.stderr, error_msg % (
150 "build mode", "build modes", _BUILD_MODES) 150 "build mode", "build modes", _BUILD_MODES)
151 sys.exit(5) 151 sys.exit(5)
152 152
153 architecture = config.ARCHITECTURE 153 architecture = config.ARCHITECTURE
154 if architecture not in _ARCHS: 154 if architecture not in _ARCHS:
155 print >>sys.stderr, error_msg % ( 155 print >>sys.stderr, error_msg % (
156 "architecture", "architectures", _ARCHS) 156 "architecture", "architectures", _ARCHS )
Felix Dahlke 2017/03/31 09:53:54 Seems unrelated, could you do this in a separate n
diegocarloslima 2017/03/31 10:07:23 Acknowledged.
157 sys.exit(6) 157 sys.exit(6)
158 158
159 if do_build: 159 if do_build:
160 apk_path = _build(architecture, distribution_mode, build_mode, 160 apk_path = _build(architecture, distribution_mode, build_mode,
161 config.ANDROID_SDK_PATH, config.ANDROID_NDK_PATH) 161 config.ANDROID_SDK_PATH, config.ANDROID_NDK_PATH)
162 if do_sign: 162 if do_sign:
163 _sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME) 163 _sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME)
164 else: 164 else:
165 print apk_path 165 print apk_path
LEFTRIGHT

Powered by Google App Engine
This is Rietveld