Index: trunk/tools/make-release/make-release |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | ./make-release 1.13.0 |
14 | 14 | |
15 | 15 | If the previous version is not given, it will be derived from the next version, |
16 | | -and you will be prompted to confirm that the version number is correct. To |
| 16 | +and you will be prompted to confirm that the version number is correct. To |
17 | 17 | always answer "yes", use the --yes option. |
18 | 18 | |
19 | 19 | Use --no-previous to disable the diff to previous entirely. |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | except getopt.GetoptError, err: |
27 | 27 | print str(err) |
28 | 28 | dieUsage() |
29 | | - |
| 29 | + |
30 | 30 | snapshot = False |
31 | 31 | yes = False |
32 | 32 | noPrevious = False |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | # Snapshot release? |
44 | 44 | if snapshot: |
45 | 45 | makeRelease( |
46 | | - version = 'snapshot-' + time.strftime('%Y%m%d', time.gmtime()), |
| 46 | + version = 'snapshot-' + time.strftime('%Y%m%d', time.gmtime()), |
47 | 47 | branch = 'trunk', |
48 | 48 | dir = 'snapshots') |
49 | 49 | return |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | if decomposed == None: |
57 | 57 | print 'Invalid version number "%s"' % (args[0]) |
58 | 58 | sys.exit(1) |
59 | | - |
| 59 | + |
60 | 60 | if len(args) >= 2: |
61 | 61 | # Given the previous version on the command line |
62 | 62 | makeRelease( |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | if not ask("Was %s the previous release?" % (decomposed['prevVersion'])): |
84 | 84 | print 'Please specify the correct previous release on the command line' |
85 | 85 | sys.exit(1) |
86 | | - |
| 86 | + |
87 | 87 | makeRelease( |
88 | 88 | version = args[0], |
89 | 89 | prevVersion = decomposed['prevVersion'], |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | ret['prevVersion'] = ret['major'] + '.' + newMinor |
116 | 116 | ret['prevBranch'] = 'tags/REL' + m.group(1) + '_' + m.group(2) + '_' + newMinor |
117 | 117 | return ret |
118 | | - |
| 118 | + |
119 | 119 | m = re.compile('(\d+)\.(\d+)\.(\d+)([A-Za-z]+)(\d+)$').match(version) |
120 | 120 | if m == None: |
121 | 121 | return None |
— | — | @@ -164,11 +164,11 @@ |
165 | 165 | else: |
166 | 166 | print "Generating normal patch file..." |
167 | 167 | args.extend(['-x', 'messages', '-x', '*.png', '-x', '*.jpg', '-x', '*.xcf']) |
168 | | - |
| 168 | + |
169 | 169 | args.extend([dir1, dir2]) |
170 | 170 | print ' '.join(args) |
171 | 171 | diffProc = subprocess.Popen(args, stdout = subprocess.PIPE) |
172 | | - gzipProc = subprocess.Popen(['gzip', '-9'], |
| 172 | + gzipProc = subprocess.Popen(['gzip', '-9'], |
173 | 173 | stdin = diffProc.stdout, stdout = patchFile) |
174 | 174 | |
175 | 175 | diffStatus = diffProc.wait() |
— | — | @@ -189,12 +189,12 @@ |
190 | 190 | |
191 | 191 | if not os.path.exists(dir): |
192 | 192 | os.mkdir(dir) |
193 | | - |
| 193 | + |
194 | 194 | package = 'mediawiki-' + version |
195 | 195 | |
196 | 196 | # Export the target |
197 | 197 | export(branch, package) |
198 | | - |
| 198 | + |
199 | 199 | # Generate the .tar.gz file |
200 | 200 | outFile = open(dir + '/' + package + '.tar.gz', 'w') |
201 | 201 | tarProc = subprocess.Popen(['tar', '-c', |
— | — | @@ -203,7 +203,7 @@ |
204 | 204 | '--exclude', 'mediawiki-largesquare.xcf', |
205 | 205 | package ], |
206 | 206 | stdout = subprocess.PIPE) |
207 | | - gzipProc = subprocess.Popen(['gzip', '-9'], |
| 207 | + gzipProc = subprocess.Popen(['gzip', '-9'], |
208 | 208 | stdin = tarProc.stdout, stdout = outFile) |
209 | 209 | |
210 | 210 | if tarProc.wait() != 0 or gzipProc.wait() != 0: |
— | — | @@ -224,7 +224,7 @@ |
225 | 225 | if (makePatch(dir + '/' + i18nPatch, prevDir, package, 'i18n')): |
226 | 226 | outFiles.append(i18nPatch) |
227 | 227 | haveI18n = True |
228 | | - |
| 228 | + |
229 | 229 | # Sign |
230 | 230 | uploadFiles = [] |
231 | 231 | for fileName in outFiles: |
— | — | @@ -234,7 +234,7 @@ |
235 | 235 | sys.exit(1) |
236 | 236 | uploadFiles.append(dir + '/' + fileName) |
237 | 237 | uploadFiles.append(dir + '/' + fileName + '.sig') |
238 | | - |
| 238 | + |
239 | 239 | # Generate upload tarball |
240 | 240 | args = ['tar', 'cf', '../uploads/upload-' + version + '.tar'] |
241 | 241 | args.extend(uploadFiles) |
— | — | @@ -242,7 +242,7 @@ |
243 | 243 | if proc.wait() != 0: |
244 | 244 | print "Failed to generate upload.tar, exiting" |
245 | 245 | sys.exit(1) |
246 | | - |
| 246 | + |
247 | 247 | # Write email template |
248 | 248 | print |
249 | 249 | print "Full release notes:" |
— | — | @@ -250,11 +250,11 @@ |
251 | 251 | print |
252 | 252 | print |
253 | 253 | print '**********************************************************************' |
254 | | - |
| 254 | + |
255 | 255 | print 'Download:' |
256 | 256 | print 'http://download.wikimedia.org/mediawiki/' + dir + '/' + package + '.tar.gz' |
257 | 257 | print |
258 | | - |
| 258 | + |
259 | 259 | if prevVersion != None: |
260 | 260 | if haveI18n: |
261 | 261 | print "Patch to previous version (" + prevVersion + "), without interface text:" |
— | — | @@ -264,7 +264,7 @@ |
265 | 265 | else: |
266 | 266 | print "Patch to previous version (" + prevVersion + "):" |
267 | 267 | print 'http://download.wikimedia.org/mediawiki/' + dir + '/' + package + '.patch.gz' |
268 | | - print |
| 268 | + print |
269 | 269 | |
270 | 270 | print 'GPG signatures:' |
271 | 271 | for fileName in outFiles: |