Skip to content

Commit

Permalink
Merge pull request #992 from acoates-ms/pubfix4
Browse files Browse the repository at this point in the history
Another publish fix
  • Loading branch information
acoates-ms authored Jan 27, 2022
2 parents f3b49cc + 1ca2cba commit 965d147
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scripts/bump-oss-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,15 @@
let branch;
if (!nightlyBuild) {
// Check we are in release branch, e.g. 0.33-stable
branch = exec('git symbolic-ref --short HEAD', {
silent: true,
}).stdout.trim();
if (process.env.BUILD_SOURCEBRANCH) {
console.log(`BUILD_SOURCEBRANCH: ${process.env.BUILD_SOURCEBRANCH}`);
branch = process.env.BUILD_SOURCEBRANCH.match(/refs\/heads\/(.*)/)[1];
console.log(`Identified branch: ${branch}`);
} else {
branch = exec('git symbolic-ref --short HEAD', {
silent: true,
}).stdout.trim();
}

if (branch.indexOf('-stable') === -1) {
echo('You must be in 0.XX-stable branch to bump a version');
Expand Down

0 comments on commit 965d147

Please sign in to comment.