Skip to content

Commit

Permalink
fix(builtin): strip leading v prefix from stamp (#1591)
Browse files Browse the repository at this point in the history
Some repos like bazelisk use a --workspace_status_command that returns tags from the repo, and their tagging scheme starts with a v prefix. We should strip that before turning it into an npm version number, which should always be numeric.
  • Loading branch information
alexeagle authored Jan 31, 2020
1 parent ee04987 commit 39bb821
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pkg_npm/packager.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function main(args) {
.find(s => s.startsWith('BUILD_SCM_VERSION'));
// Don't assume BUILD_SCM_VERSION exists
if (versionTag) {
version = versionTag.split(' ')[1].trim();
version = versionTag.split(' ')[1].replace(/^v/, '').trim();
}
}
substitutions.push([new RegExp(replaceWithVersion, 'g'), version]);
Expand Down

0 comments on commit 39bb821

Please sign in to comment.