init
This commit is contained in:
20
public/tinymce/tools/tasks/validateVersion.js
Normal file
20
public/tinymce/tools/tasks/validateVersion.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/* eslint-env node */
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var package = require(path.join(__dirname, '../../package.json'));
|
||||
|
||||
module.exports = function (grunt) {
|
||||
grunt.registerTask("validateVersion", "Check that version number in changelog and package.json match", function () {
|
||||
var changelog = fs.readFileSync(path.join(__dirname, '../../changelog.txt'));
|
||||
var changelogVersion = /Version ([0-9.]+)/.exec(changelog)[1];
|
||||
|
||||
if (package.version !== changelogVersion) {
|
||||
grunt.fail.fatal(
|
||||
'Latest changelog version ' + changelogVersion +
|
||||
' and package.json version ' + package.version +
|
||||
' does not match.'
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user