Skip to content

Commit 68d8c2e

Browse files
authored
Merge pull request #582 from somdoron/master
script to patch project.json file on CI
2 parents 9b7138c + 5e95649 commit 68d8c2e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

patch-version.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var fs = require('fs');
2+
var path = require('path');
3+
4+
var file = './src/NetMQ/project.json';
5+
var version = process.env.APPVEYOR_REPO_TAG_NAME;
6+
7+
var jsonText = fs.readFileSync(path.join(__dirname, file), {
8+
encoding: 'utf8'
9+
});
10+
11+
var project = JSON.parse(jsonText);
12+
project.version = version;
13+
jsonText = JSON.stringify(project);
14+
fs.writeFileSync(file, jsonText, {encoding:'utf8'})

0 commit comments

Comments
 (0)