Skip to content

Commit

Permalink
Merge pull request #582 from somdoron/master
Browse files Browse the repository at this point in the history
script to patch project.json file on CI
  • Loading branch information
c-rack authored Jul 13, 2016
2 parents 9b7138c + 5e95649 commit 68d8c2e
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 68d8c2e

Please sign in to comment.