diff options
author | Timmy Willison <4timmywil@gmail.com> | 2017-03-17 12:30:55 -0400 |
---|---|---|
committer | Timmy Willison <4timmywil@gmail.com> | 2017-03-17 12:38:23 -0400 |
commit | f8faf1489e049e45b8e829043649425d1a2a7bf8 (patch) | |
tree | 89a32c3ccdd5336d4884b3a98de5be514d90fa31 /build/release | |
parent | a31111bdb49f76b38690efbda6d04be8493811a7 (diff) | |
download | jquery-f8faf1489e049e45b8e829043649425d1a2a7bf8.tar.gz jquery-f8faf1489e049e45b8e829043649425d1a2a7bf8.zip |
Release: edit dist README version on release
Fixes gh-3574
Diffstat (limited to 'build/release')
-rw-r--r-- | build/release/dist.js | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/build/release/dist.js b/build/release/dist.js index e0237febe..ca7922628 100644 --- a/build/release/dist.js +++ b/build/release/dist.js @@ -50,6 +50,15 @@ module.exports = function( Release, files, complete ) { } /** + * Replace the version in the README + * @param {string} readme + */ + function editReadme( readme ) { + var rprev = new RegExp( Release.prevVersion, "g" ); + return readme.replace( rprev, Release.newVersion ); + } + + /** * Copy necessary files over to the dist repo */ function copy() { @@ -57,6 +66,7 @@ module.exports = function( Release, files, complete ) { // Copy dist files var distFolder = Release.dir.dist + "/dist", externalFolder = Release.dir.dist + "/external", + readme = fs.readFileSync( Release.dir.dist + "/README.md", "utf8" ), rmIgnore = files .concat( [ "README.md", @@ -93,8 +103,17 @@ module.exports = function( Release, files, complete ) { // Write generated bower file fs.writeFileSync( Release.dir.dist + "/bower.json", generateBower() ); - console.log( "Adding files to dist..." ); + fs.writeFileSync( Release.dir.dist + "/README.md", editReadme( readmeĀ ) ); + + console.log( "Files ready to add." ); + console.log( "Edit the dist README.md to include the latest blog post link." ); + } + /** + * Add, commit, and tag the dist files + */ + function commit() { + console.log( "Adding files to dist..." ); Release.exec( "git add -A", "Error adding files." ); Release.exec( "git commit -m \"Release " + Release.newVersion + "\"", @@ -130,6 +149,10 @@ module.exports = function( Release, files, complete ) { copy, Release.confirmReview, + Release._section( "Add, commit, and tag files in distribution repo" ), + commit, + Release.confirmReview, + Release._section( "Pushing files to distribution repo" ), push ], complete ); |