|
1 | 1 | #!/usr/bin/env node |
2 | 2 |
|
3 | | -var baseDir, repoDir, majorMinorVersion, patchVersion, prevVersion, newVersion, |
4 | | - nextVersion, tagTime, |
| 3 | +var baseDir, repoDir, prevVersion, newVersion, nextVersion, tagTime, |
5 | 4 | fs = require( "fs" ), |
6 | 5 | path = require( "path" ), |
7 | 6 | // support: node <0.8 |
@@ -110,8 +109,6 @@ function getVersions() { |
110 | 109 | abort( "This script is not smart enough to handle the 2.0.0 release." ); |
111 | 110 | } |
112 | 111 |
|
113 | | - majorMinorVersion = [ major, minor ].join( "." ); |
114 | | - patchVersion = patch; |
115 | 112 | prevVersion = patch === 0 ? |
116 | 113 | [ major, minor - 1, 0 ].join( "." ) : |
117 | 114 | [ major, minor, patch - 1 ].join( "." ); |
@@ -197,12 +194,7 @@ function generateChangelog() { |
197 | 194 | changelog = cat( "build/release/changelog-shell" ) + "\n", |
198 | 195 | fullFormat = "* %s (TICKETREF, [%h](http://github.com/jquery/jquery-ui/commit/%H))"; |
199 | 196 |
|
200 | | - changelog = changelog |
201 | | - .replace( "{title}", "jQuery UI " + newVersion + " Changelog" ) |
202 | | - .replace( "{summary}", patchVersion === 0 ? |
203 | | - "This is the final release of jQuery UI " + majorMinorVersion + "." : |
204 | | - "This is the " + ordinal( patchVersion ) + " maintenance release for " + |
205 | | - "[jQuery UI " + majorMinorVersion + "](/changelog/" + majorMinorVersion + ")." ); |
| 197 | + changelog = changelog.replace( "{title}", "jQuery UI " + newVersion + " Changelog" ); |
206 | 198 |
|
207 | 199 | echo ( "Adding commits..." ); |
208 | 200 | commits = gitLog( fullFormat ); |
@@ -330,30 +322,6 @@ function writePackage( pkg ) { |
330 | 322 | JSON.stringify( pkg, null, "\t" ) + "\n" ); |
331 | 323 | } |
332 | 324 |
|
333 | | -function ordinal( number ) { |
334 | | - return number === 1 ? "first" : |
335 | | - number === 2 ? "second" : |
336 | | - number === 3 ? "third" : |
337 | | - number === 4 ? "fourth" : |
338 | | - number === 5 ? "fifth" : |
339 | | - number === 6 ? "sixth" : |
340 | | - number === 7 ? "seventh" : |
341 | | - number === 8 ? "eighth" : |
342 | | - number === 9 ? "ninth" : |
343 | | - number === 10 ? "tenth" : |
344 | | - number === 11 ? "eleventh" : |
345 | | - number === 12 ? "twelfth" : |
346 | | - number === 13 ? "thirteenth" : |
347 | | - number === 14 ? "fourteenth" : |
348 | | - number === 15 ? "fifteenth" : |
349 | | - number === 16 ? "sixteenth" : |
350 | | - number === 17 ? "seventeenth" : |
351 | | - number === 18 ? "eighteenth" : |
352 | | - number === 19 ? "nineteenth" : |
353 | | - number === 20 ? "twentieth" : |
354 | | - "twenty " + ordinal( number - 20 ); |
355 | | -} |
356 | | - |
357 | 325 | function bootstrap( fn ) { |
358 | 326 | console.log( "Determining directories..." ); |
359 | 327 | baseDir = process.cwd() + "/__release"; |
|
0 commit comments