Skip to content

Commit

Permalink
add patch version script to patch project json version
Browse files Browse the repository at this point in the history
  • Loading branch information
somdoron committed Jul 13, 2016
1 parent b9ac1e4 commit 5e95649
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions patch-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var fs = require('fs');
var path = require('path');

var file = './src/NetMQ/project.json';
var version = process.env.APPVEYOR_REPO_TAG_NAME;

var jsonText = fs.readFileSync(path.join(__dirname, file), {
encoding: 'utf8'
});

var project = JSON.parse(jsonText);
project.version = version;
jsonText = JSON.stringify(project);
fs.writeFileSync(file, jsonText, {encoding:'utf8'})

0 comments on commit 5e95649

Please sign in to comment.