r98493 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98492‎ | r98493 | r98494 >
Date:00:20, 30 September 2011
Author:reedy
Status:ok
Tags:
Comment:
Trim trailing whitespace
Modified paths:
  • /trunk/tools/make-release/make-release (modified) (history)

Diff [purge]

Index: trunk/tools/make-release/make-release
@@ -12,7 +12,7 @@
1313 ./make-release 1.13.0
1414
1515 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
1717 always answer "yes", use the --yes option.
1818
1919 Use --no-previous to disable the diff to previous entirely.
@@ -25,7 +25,7 @@
2626 except getopt.GetoptError, err:
2727 print str(err)
2828 dieUsage()
29 -
 29+
3030 snapshot = False
3131 yes = False
3232 noPrevious = False
@@ -42,7 +42,7 @@
4343 # Snapshot release?
4444 if snapshot:
4545 makeRelease(
46 - version = 'snapshot-' + time.strftime('%Y%m%d', time.gmtime()),
 46+ version = 'snapshot-' + time.strftime('%Y%m%d', time.gmtime()),
4747 branch = 'trunk',
4848 dir = 'snapshots')
4949 return
@@ -55,7 +55,7 @@
5656 if decomposed == None:
5757 print 'Invalid version number "%s"' % (args[0])
5858 sys.exit(1)
59 -
 59+
6060 if len(args) >= 2:
6161 # Given the previous version on the command line
6262 makeRelease(
@@ -82,7 +82,7 @@
8383 if not ask("Was %s the previous release?" % (decomposed['prevVersion'])):
8484 print 'Please specify the correct previous release on the command line'
8585 sys.exit(1)
86 -
 86+
8787 makeRelease(
8888 version = args[0],
8989 prevVersion = decomposed['prevVersion'],
@@ -114,7 +114,7 @@
115115 ret['prevVersion'] = ret['major'] + '.' + newMinor
116116 ret['prevBranch'] = 'tags/REL' + m.group(1) + '_' + m.group(2) + '_' + newMinor
117117 return ret
118 -
 118+
119119 m = re.compile('(\d+)\.(\d+)\.(\d+)([A-Za-z]+)(\d+)$').match(version)
120120 if m == None:
121121 return None
@@ -164,11 +164,11 @@
165165 else:
166166 print "Generating normal patch file..."
167167 args.extend(['-x', 'messages', '-x', '*.png', '-x', '*.jpg', '-x', '*.xcf'])
168 -
 168+
169169 args.extend([dir1, dir2])
170170 print ' '.join(args)
171171 diffProc = subprocess.Popen(args, stdout = subprocess.PIPE)
172 - gzipProc = subprocess.Popen(['gzip', '-9'],
 172+ gzipProc = subprocess.Popen(['gzip', '-9'],
173173 stdin = diffProc.stdout, stdout = patchFile)
174174
175175 diffStatus = diffProc.wait()
@@ -189,12 +189,12 @@
190190
191191 if not os.path.exists(dir):
192192 os.mkdir(dir)
193 -
 193+
194194 package = 'mediawiki-' + version
195195
196196 # Export the target
197197 export(branch, package)
198 -
 198+
199199 # Generate the .tar.gz file
200200 outFile = open(dir + '/' + package + '.tar.gz', 'w')
201201 tarProc = subprocess.Popen(['tar', '-c',
@@ -203,7 +203,7 @@
204204 '--exclude', 'mediawiki-largesquare.xcf',
205205 package ],
206206 stdout = subprocess.PIPE)
207 - gzipProc = subprocess.Popen(['gzip', '-9'],
 207+ gzipProc = subprocess.Popen(['gzip', '-9'],
208208 stdin = tarProc.stdout, stdout = outFile)
209209
210210 if tarProc.wait() != 0 or gzipProc.wait() != 0:
@@ -224,7 +224,7 @@
225225 if (makePatch(dir + '/' + i18nPatch, prevDir, package, 'i18n')):
226226 outFiles.append(i18nPatch)
227227 haveI18n = True
228 -
 228+
229229 # Sign
230230 uploadFiles = []
231231 for fileName in outFiles:
@@ -234,7 +234,7 @@
235235 sys.exit(1)
236236 uploadFiles.append(dir + '/' + fileName)
237237 uploadFiles.append(dir + '/' + fileName + '.sig')
238 -
 238+
239239 # Generate upload tarball
240240 args = ['tar', 'cf', '../uploads/upload-' + version + '.tar']
241241 args.extend(uploadFiles)
@@ -242,7 +242,7 @@
243243 if proc.wait() != 0:
244244 print "Failed to generate upload.tar, exiting"
245245 sys.exit(1)
246 -
 246+
247247 # Write email template
248248 print
249249 print "Full release notes:"
@@ -250,11 +250,11 @@
251251 print
252252 print
253253 print '**********************************************************************'
254 -
 254+
255255 print 'Download:'
256256 print 'http://download.wikimedia.org/mediawiki/' + dir + '/' + package + '.tar.gz'
257257 print
258 -
 258+
259259 if prevVersion != None:
260260 if haveI18n:
261261 print "Patch to previous version (" + prevVersion + "), without interface text:"
@@ -264,7 +264,7 @@
265265 else:
266266 print "Patch to previous version (" + prevVersion + "):"
267267 print 'http://download.wikimedia.org/mediawiki/' + dir + '/' + package + '.patch.gz'
268 - print
 268+ print
269269
270270 print 'GPG signatures:'
271271 for fileName in outFiles:

Status & tagging log