PHP Classes

File: public/js/tinymce/tools/tasks/validateVersion.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/tools/tasks/validateVersion.js   Download  
File: public/js/tinymce/tools/tasks/validateVersion.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 685 bytes
 

Contents

Class file image Download
/* 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.' ); } }); };