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

Delta Between Two Patch Sets: build_release.py

Issue 29356716: Issue 4528 - Update StarSSL's timestamp URL (Closed)
Left Patch Set: Created Oct. 13, 2016, 8:17 p.m.
Right Patch Set: Use the Comodo timestamp URL Created Oct. 14, 2016, 11 a.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 sys, os, re, subprocess 3 import sys, os, re, subprocess
4 4
5 def print_usage(): 5 def print_usage():
6 print >>sys.stderr, "Usage: %s release|devbuild SIGNING_KEY_FILE" % (os.path.b asename(sys.argv[0])) 6 print >>sys.stderr, "Usage: %s release|devbuild SIGNING_KEY_FILE" % (os.path.b asename(sys.argv[0]))
7 7
8 if len(sys.argv) < 3: 8 if len(sys.argv) < 3:
9 print_usage() 9 print_usage()
10 sys.exit(1) 10 sys.exit(1)
11 11
12 basedir = os.path.dirname(os.path.abspath(sys.argv[0])) 12 basedir = os.path.dirname(os.path.abspath(sys.argv[0]))
13 build_type = sys.argv[1] 13 build_type = sys.argv[1]
14 14
15 if not build_type in ["release", "devbuild"]: 15 if not build_type in ["release", "devbuild"]:
16 print_usage() 16 print_usage()
17 sys.exit(2) 17 sys.exit(2)
18 18
19 key = sys.argv[2] 19 key = sys.argv[2]
20 20
21 def sign_command(*argv): 21 def sign_command(*argv):
22 return [ 22 return [
23 "signtool.exe", 23 "signtool.exe",
24 "sign", "/v", 24 "sign", "/v",
25 "/d", "Adblock Plus", 25 "/d", "Adblock Plus",
26 "/du", "https://adblockplus.org/", 26 "/du", "https://adblockplus.org/",
27 "/f", key, 27 "/f", key,
28 "/tr", "http://tsa.startssl.com/rfc3161" 28 "/tr", "http://timestamp.comodoca.com"
sergei 2016/10/14 14:57:58 Just wonder, is there any difference between http:
Oleksandr 2016/10/14 17:08:16 The difference is in the company behind the URL. S
sergei 2016/10/14 17:53:09 My URLs are for the same company but in the first
Oleksandr 2016/10/14 18:13:22 Oh. Understood your question now. Where is the /rf
29 ] + list(argv) 29 ] + list(argv)
30 30
31 def sign(*argv): 31 def sign(*argv):
32 subprocess.check_call(sign_command(*argv)) 32 subprocess.check_call(sign_command(*argv))
33 33
34 def read_macro_value(file, macro): 34 def read_macro_value(file, macro):
35 handle = open(file, 'rb') 35 handle = open(file, 'rb')
36 for line in handle: 36 for line in handle:
37 match = re.search(r"^\s*#define\s+%s\s+\w?\"(.*?)\"" % macro, line) 37 match = re.search(r"^\s*#define\s+%s\s+\w?\"(.*?)\"" % macro, line)
38 if match: 38 if match:
(...skipping 23 matching lines...) Expand all
62 62
63 installerParams = os.environ.copy() 63 installerParams = os.environ.copy()
64 installerParams["VERSION"] = version 64 installerParams["VERSION"] = version
65 subprocess.check_call(["nmake", "/A", "ia32", "x64"], env=installerParams, cwd=o s.path.join(basedir, "installer")) 65 subprocess.check_call(["nmake", "/A", "ia32", "x64"], env=installerParams, cwd=o s.path.join(basedir, "installer"))
66 sign(os.path.join(basedir, "installer", "build", "ia32", "adblockplusie-%s-multi language-ia32.msi" % version), 66 sign(os.path.join(basedir, "installer", "build", "ia32", "adblockplusie-%s-multi language-ia32.msi" % version),
67 os.path.join(basedir, "installer", "build", "x64", "adblockplusie-%s-multila nguage-x64.msi" % version)) 67 os.path.join(basedir, "installer", "build", "x64", "adblockplusie-%s-multila nguage-x64.msi" % version))
68 68
69 # If this fails, please check if InnoSetup is installed and added to you PATH 69 # If this fails, please check if InnoSetup is installed and added to you PATH
70 signparam = " ".join(map(lambda p: "$q%s$q" % p if " " in p else p, sign_command ("$f"))) 70 signparam = " ".join(map(lambda p: "$q%s$q" % p if " " in p else p, sign_command ("$f")))
71 subprocess.check_call(["iscc", "/A", "/Ssigntool=%s" % signparam, "/Dversion=%s" % version, os.path.join(basedir, "installer", "src", "innosetup-exe", "64BitTwo Arch.iss")]) 71 subprocess.check_call(["iscc", "/A", "/Ssigntool=%s" % signparam, "/Dversion=%s" % version, os.path.join(basedir, "installer", "src", "innosetup-exe", "64BitTwo Arch.iss")])
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