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

Side by Side Diff: releaseAutomation.py

Issue 29363565: Issue 4552 - Drop jshydra dependency (buildtools) (Closed)
Patch Set: Check module exists before auto-loading it Created Nov. 30, 2016, 3:24 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 | « packagerChrome.py ('k') | templates/modules.js.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # This Source Code Form is subject to the terms of the Mozilla Public 1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 4
5 import os 5 import os
6 import re 6 import re
7 import codecs 7 import codecs
8 import subprocess 8 import subprocess
9 import tarfile 9 import tarfile
10 import json 10 import json
11 11
12 from packager import readMetadata, getDefaultFileName 12 from packager import readMetadata, getDefaultFileName
13 13
14
14 def get_dependencies(prefix, repos): 15 def get_dependencies(prefix, repos):
15 from ensure_dependencies import read_deps, safe_join 16 from ensure_dependencies import read_deps, safe_join
16 repo = repos[prefix] 17 repo = repos[prefix]
17 deps = read_deps(repo) 18 deps = read_deps(repo)
18 if deps: 19 if deps:
19 for subpath in deps: 20 for subpath in deps:
20 if subpath.startswith('_'): 21 if subpath.startswith('_'):
21 continue 22 continue
22 depprefix = prefix + subpath + '/' 23 depprefix = prefix + subpath + '/'
23 deppath = safe_join(repo, subpath) 24 deppath = safe_join(repo, subpath)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 create_sourcearchive(baseDir, archivePath) 116 create_sourcearchive(baseDir, archivePath)
116 downloads.append(archivePath) 117 downloads.append(archivePath)
117 118
118 # Now add the downloads and commit 119 # Now add the downloads and commit
119 subprocess.check_call(['hg', 'add', '-R', downloadsRepo] + downloads) 120 subprocess.check_call(['hg', 'add', '-R', downloadsRepo] + downloads)
120 subprocess.check_call(['hg', 'commit', '-R', downloadsRepo, '-m', 'Releasing %s %s' % (extensionName, version)]) 121 subprocess.check_call(['hg', 'commit', '-R', downloadsRepo, '-m', 'Releasing %s %s' % (extensionName, version)])
121 122
122 # Push all changes 123 # Push all changes
123 subprocess.check_call(['hg', 'push', '-R', baseDir]) 124 subprocess.check_call(['hg', 'push', '-R', baseDir])
124 subprocess.check_call(['hg', 'push', '-R', downloadsRepo]) 125 subprocess.check_call(['hg', 'push', '-R', downloadsRepo])
OLDNEW
« no previous file with comments | « packagerChrome.py ('k') | templates/modules.js.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld