Browse Source

Add a nodejs script to patch the project.json file with the AppVeyor version number

Former-commit-id: 547399af66beb1b843ff0ef3d6540f8132ffaab1
Former-commit-id: ba3b2143364e06c45e662284cc134634451bbe5b
Former-commit-id: ab0b04b0e427d286d3611dd424fccda6138c3999
af/merge-core
Jeavon 10 years ago
parent
commit
7aa4e92848
  1. 5
      .gitignore
  2. 12
      build/aspnet5-version.js
  3. 5
      build/package.json

5
.gitignore

@ -172,4 +172,7 @@ build/TestResult.xml
*.db
_site/
.vs/config/applicationhost.config
.vs/config/applicationhost.config
**/node_modules
**/node_modules/*

12
build/aspnet5-version.js

@ -0,0 +1,12 @@
var jsonfile = require('jsonfile');
var util = require('util');
var file = '../src/imageprocessor/project.json';
var buildNumber = process.env.APPVEYOR_BUILD_NUMBER;
jsonfile.readFile(file, function (err, project) {
project.version = buildNumber;
jsonfile.writeFile(file, project, {spaces: 2}, function(err) {
console.error(err);
});
})

5
build/package.json

@ -0,0 +1,5 @@
{
"dependencies": {
"jsonfile": "^2.2.3"
}
}
Loading…
Cancel
Save