Browse Source

import change-version-number Grunt task from Bootstrap

pull/293/head
Chris Rebert 11 years ago
parent
commit
b3860d1932
  1. 16
      Gruntfile.js
  2. 1
      package.json

16
Gruntfile.js

@ -138,6 +138,17 @@ module.exports = function(grunt) {
files: {
src: '_site/**/*.html'
}
},
sed: {
versionNumber: {
pattern: (function () {
var old = grunt.option('oldver');
return old ? RegExp.quote(old) : old;
})(),
replacement: grunt.option('newver'),
recursive: true
}
}
});
@ -152,4 +163,9 @@ module.exports = function(grunt) {
grunt.registerTask('validate-html', ['jekyll', 'validation']);
grunt.registerTask('default', ['dist']);
grunt.registerTask('build', ['dist']);
// Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
// This can be overzealous, so its changes should always be manually reviewed!
grunt.registerTask('change-version-number', 'sed');
};

1
package.json

@ -39,6 +39,7 @@
"grunt-contrib-watch": "~0.5.3",
"grunt-html-validation": "~0.1.13",
"grunt-jekyll": "~0.4.1",
"grunt-sed": "~0.1.1",
"load-grunt-tasks": "~0.4.0"
}
}

Loading…
Cancel
Save