OLD | NEW |
1 # coding: utf-8 | 1 # coding: utf-8 |
2 | 2 |
3 # This Source Code is subject to the terms of the Mozilla Public License | 3 # This Source Code is subject to the terms of the Mozilla Public License |
4 # version 2.0 (the "License"). You can obtain a copy of the License at | 4 # version 2.0 (the "License"). You can obtain a copy of the License at |
5 # http://mozilla.org/MPL/2.0/. | 5 # http://mozilla.org/MPL/2.0/. |
6 | 6 |
7 import os, re, subprocess, tarfile | 7 import os, re, subprocess, tarfile |
8 from StringIO import StringIO | 8 from StringIO import StringIO |
9 import buildtools.packager as packager | 9 import buildtools.packagerGecko as packager |
10 | 10 |
11 def run(baseDir, version, keyFile, downloadsRepo, buildtoolsRepo): | 11 def run(baseDir, version, keyFile, downloadsRepo, buildtoolsRepo): |
12 # Replace version number in metadata file "manually", ConfigParser will mess | 12 # Replace version number in metadata file "manually", ConfigParser will mess |
13 # up the order of lines. | 13 # up the order of lines. |
14 handle = open(packager.getMetadataPath(baseDir), 'rb') | 14 handle = open(packager.getMetadataPath(baseDir), 'rb') |
15 rawMetadata = handle.read() | 15 rawMetadata = handle.read() |
16 handle.close() | 16 handle.close() |
17 versionRegExp = re.compile(r'^(\s*version\s*=\s*).*', re.I | re.M) | 17 versionRegExp = re.compile(r'^(\s*version\s*=\s*).*', re.I | re.M) |
18 rawMetadata = re.sub(versionRegExp, r'\g<1>%s' % version, rawMetadata) | 18 rawMetadata = re.sub(versionRegExp, r'\g<1>%s' % version, rawMetadata) |
19 handle = open(packager.getMetadataPath(baseDir), 'wb') | 19 handle = open(packager.getMetadataPath(baseDir), 'wb') |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 subprocess.Popen(['hg', 'commit', '-R', downloadsRepo, '-m', 'Releasing %s %s'
% (extensionName, version)]).communicate() | 63 subprocess.Popen(['hg', 'commit', '-R', downloadsRepo, '-m', 'Releasing %s %s'
% (extensionName, version)]).communicate() |
64 subprocess.Popen(['hg', 'tag', '-R', downloadsRepo, '-f', tagName]).communicat
e() | 64 subprocess.Popen(['hg', 'tag', '-R', downloadsRepo, '-f', tagName]).communicat
e() |
65 | 65 |
66 # Tag buildtools repository as well | 66 # Tag buildtools repository as well |
67 subprocess.Popen(['hg', 'tag', '-R', buildtoolsRepo, '-f', tagName]).communica
te() | 67 subprocess.Popen(['hg', 'tag', '-R', buildtoolsRepo, '-f', tagName]).communica
te() |
68 | 68 |
69 # Push all changes | 69 # Push all changes |
70 subprocess.Popen(['hg', 'push', '-R', baseDir]).communicate() | 70 subprocess.Popen(['hg', 'push', '-R', baseDir]).communicate() |
71 subprocess.Popen(['hg', 'push', '-R', downloadsRepo]).communicate() | 71 subprocess.Popen(['hg', 'push', '-R', downloadsRepo]).communicate() |
72 subprocess.Popen(['hg', 'push', '-R', buildtoolsRepo]).communicate() | 72 subprocess.Popen(['hg', 'push', '-R', buildtoolsRepo]).communicate() |
OLD | NEW |