OLD | NEW |
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 Loading... |
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]) |
OLD | NEW |