Skip to content

Commit

Permalink
use TRAVIS_BRANCH environment variable if available
Browse files Browse the repository at this point in the history
  • Loading branch information
peuter committed Oct 19, 2016
1 parent 90f998d commit b9a88d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .doc/plugins/widget_example.js
Expand Up @@ -12,7 +12,7 @@ var libxmljs = require('libxml-xsd').libxmljs;
var ini = require('ini');
var execSync = require('child_process').execSync;

var branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim();
var branch = process.env.TRAVIS_BRANCH ? process.env.TRAVIS_BRANCH : execSync('git rev-parse --abbrev-ref HEAD').toString().trim();
var config = ini.parse(fs.readFileSync(path.join(".doc", "config.ini"), 'utf-8'));
var manifest = JSON.parse(fs.readFileSync('./package.json'));
var version = (branch == "develop") ? config.DEFAULT['develop-version-mapping'] : manifest.version;
Expand Down

0 comments on commit b9a88d7

Please sign in to comment.