Permalink
Browse files

Build: Update version references in the README during releases

Fixes gh-249
Closes gh-306
  • Loading branch information...
scottgonzalez committed Jul 14, 2016
1 parent a9d1b71 commit 35d17d8a391998c8c2128abff52d17bf7a5c452d
Showing with 13 additions and 0 deletions.
  1. +13 −0 build/release.js
View
@@ -1,3 +1,6 @@
var fs = require("fs");
var path = require("path");
module.exports = function(Release) {
Release.define({
@@ -11,7 +14,17 @@ Release.define({
generateArtifacts: function(callback) {
Release.exec("grunt");
// Update version references in README.md
var readmePath = path.join(Release.dir.repo, "README.md");
var readme = fs.readFileSync(readmePath, "utf8").replace(
/pep\/\d+\.\d+\.\d+\/pep\.js/g,
"pep/" + Release.newVersion + "/pep.js"
);
fs.writeFileSync(readmePath, readme);
callback([
"README.md",
"dist/pep.js",
"dist/pep.min.js"
]);

0 comments on commit 35d17d8

Please sign in to comment.