Skip to content

Commit 39bb821

Browse files
authored
fix(builtin): strip leading v prefix from stamp (#1591)
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.
1 parent ee04987 commit 39bb821

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/pkg_npm/packager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function main(args) {
9696
.find(s => s.startsWith('BUILD_SCM_VERSION'));
9797
// Don't assume BUILD_SCM_VERSION exists
9898
if (versionTag) {
99-
version = versionTag.split(' ')[1].trim();
99+
version = versionTag.split(' ')[1].replace(/^v/, '').trim();
100100
}
101101
}
102102
substitutions.push([new RegExp(replaceWithVersion, 'g'), version]);

0 commit comments

Comments
 (0)