Skip to content

Commit

Permalink
style: make jscs happy
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-bansil committed Nov 16, 2016
1 parent fc3e109 commit c45824a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ function genNpmPluginXML() {

fs.writeFileSync('plugin.xml', xml);
};
//first match only!
// first match only!
var PLUGIN_XML_VERSION_REGEX = /^\s*version=\"[\d\.]*\"\>$/m;
gulp.task('update-plugin-xml-version', () => {
var versionNumber = require('./package.json').version;
// this will break if plugin.xml is not formatted exactly as we expect
// so you might end up needing to fix the regex
for(target of ['.xml', '.template.xml']){
for (target of [ '.xml', '.template.xml' ]) {
var pluginXML = fs.readFileSync('plugin' + target, 'utf8');
var newVersionXML = ` version="${versionNumber}">`;
pluginXML = pluginXML.replace(PLUGIN_XML_VERSION_REGEX, newVersionXML);
Expand Down

0 comments on commit c45824a

Please sign in to comment.