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

Delta Between Two Patch Sets: build.py

Issue 29365856: Issue 4679 - Refactoring of build.py in adblockbrowser-build (Closed)
Left Patch Set: Created Nov. 30, 2016, 5:42 p.m.
Right Patch Set: Removing APK_PATH from build-and-sign command description Created Dec. 12, 2016, 5:11 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 | « no previous file | no next file » | 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 25 matching lines...) Expand all
36 _BUILD_RELEASE = "release" 36 _BUILD_RELEASE = "release"
37 _BUILD_MODES = (_BUILD_DEVBUILD, _BUILD_RELEASE) 37 _BUILD_MODES = (_BUILD_DEVBUILD, _BUILD_RELEASE)
38 _OBJDIR_ARM = "obj-arm-linux-androideabi" 38 _OBJDIR_ARM = "obj-arm-linux-androideabi"
39 _OBJDIR_X86 = "obj-i386-linux-android" 39 _OBJDIR_X86 = "obj-i386-linux-android"
40 40
41 41
42 def print_usage(): 42 def print_usage():
43 print >>sys.stderr, string.Template("""\ 43 print >>sys.stderr, string.Template("""\
44 Usage: $name %s 44 Usage: $name %s
45 $name %s APK_PATH 45 $name %s APK_PATH
46 $name %s APK_PATH\ 46 $name %s\
anton 2016/12/01 06:50:15 shouldn't it be `$name %s` here (APK_PATH is not r
diegocarloslima 2016/12/01 10:36:18 Actually the APK_PATH was missing in the error mes
Felix Dahlke 2016/12/12 08:03:19 No, APK_PATH is not required for build-and-sign: F
diegocarloslima 2016/12/12 09:42:43 Yeah, my bad, it isn't required. Actually, it alre
47 """ % (_CMD_BUILD, _CMD_SIGN, 47 """ % (_CMD_BUILD, _CMD_SIGN,
48 _CMD_BUILD_SIGN)).substitute({"name": os.path.basename(sys.argv[0])}) 48 _CMD_BUILD_SIGN)).substitute({"name": os.path.basename(sys.argv[0])})
49 49
50 50
51 def _generate_mozconfig(architecture, distribution_mode, build_mode): 51 def _generate_mozconfig(architecture, distribution_mode, build_mode):
52 mozconfig_path = _GENERATED_MOZCONFIG_PATH 52 mozconfig_path = _GENERATED_MOZCONFIG_PATH
53 with open(mozconfig_path, "w+") as mozconfig: 53 with open(mozconfig_path, "w+") as mozconfig:
54 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_COMMON_PATH) 54 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_COMMON_PATH)
55 if architecture == _ARCH_X86: 55 if architecture == _ARCH_X86:
56 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_X86_PATH) 56 mozconfig.write(". \"%s\"\n" % _MOZCONFIG_X86_PATH)
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 "build mode", "build modes", _BUILD_MODES) 154 "build mode", "build modes", _BUILD_MODES)
155 sys.exit(6) 155 sys.exit(6)
156 156
157 if do_build: 157 if do_build:
158 apk_path = _build(architecture, distribution_mode, build_mode, 158 apk_path = _build(architecture, distribution_mode, build_mode,
159 config.ANDROID_SDK_PATH, config.ANDROID_NDK_PATH) 159 config.ANDROID_SDK_PATH, config.ANDROID_NDK_PATH)
160 if do_sign: 160 if do_sign:
161 _sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME) 161 _sign(apk_path, config.ANDROID_KEYSTORE_PATH, config.ANDROID_KEY_NAME)
162 else: 162 else:
163 print apk_path 163 print apk_path
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld