From 5e956498781202d08519a109b02c00a86ef34030 Mon Sep 17 00:00:00 2001 From: Doron Somech Date: Wed, 13 Jul 2016 19:41:02 +0300 Subject: [PATCH] add patch version script to patch project json version --- patch-version.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 patch-version.js diff --git a/patch-version.js b/patch-version.js new file mode 100644 index 000000000..afcd91280 --- /dev/null +++ b/patch-version.js @@ -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'}) \ No newline at end of file