Skip to content

Commit 09c94bb

Browse files
committed
fix: env vars on Jenkins
1 parent 56e7752 commit 09c94bb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

analyzeCommits.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const analyzeCommits = require('@semantic-release/commit-analyzer')
33
module.exports = function (pluginConfig, config, cb) {
44
// run standard commit analysis
55
return analyzeCommits(pluginConfig, config, function(error, type) {
6-
const branch = config.env.TRAVIS_BRANCH || config.env.GIT_BRANCH;
6+
const branch = config.env.TRAVIS_BRANCH || config.env.GIT_LOCAL_BRANCH;
77
const branchTags = config.options.branchTags;
88
const distTag = branchTags && branchTags[branch];
99
let releaseType = type;

bin/semantic-prerelease.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const path = require('path');
44
const config = require(path.resolve('package.json'));
5-
const branch = process.env.TRAVIS_BRANCH || process.env.GIT_BRANCH;
5+
const branch = process.env.TRAVIS_BRANCH || process.env.GIT_LOCAL_BRANCH;
66
const branchTags = config.release && config.release.branchTags;
77
const tag = branchTags && branchTags[branch];
88
const dryRun = process.argv.find(arg => /^(--dry-run|-n)$/.test(arg));

getLastRelease.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = function (pluginConfig, config, cb) {
77
if (config.env.TRAVIS) {
88
branch = config.env.TRAVIS_BRANCH;
99
} else {
10-
branch = config.env.GIT_BRANCH;
10+
branch = config.env.GIT_LOCAL_BRANCH;
1111
}
1212

1313
const distTag = config.options.branchTags[branch];

0 commit comments

Comments
 (0)