Merge pull request #100 from immutable-actions/ddivad195/fix-semver-parsing
fix semver parsing by removing `v` from version
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Dependency directory
|
||||
node_modules
|
||||
|
||||
.npmrc
|
||||
|
||||
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
|
||||
# Logs
|
||||
logs
|
||||
|
||||
+1
-1
@@ -128343,7 +128343,7 @@ function parseSemverTagFromRef(ref) {
|
||||
throw new Error(`The ref ${ref} is not a valid tag reference.`);
|
||||
}
|
||||
const rawTag = ref.replace(/^refs\/tags\//, '');
|
||||
const semverTag = semver_1.default.parse(rawTag);
|
||||
const semverTag = semver_1.default.parse(rawTag.replace(/^v/, ''));
|
||||
if (!semverTag) {
|
||||
throw new Error(`${rawTag} is not a valid semantic version tag, and so cannot be uploaded to the action package.`);
|
||||
}
|
||||
|
||||
+1
-2
@@ -83,13 +83,12 @@ function parseSemverTagFromRef(ref: string): semver.SemVer {
|
||||
}
|
||||
|
||||
const rawTag = ref.replace(/^refs\/tags\//, '')
|
||||
const semverTag = semver.parse(rawTag)
|
||||
const semverTag = semver.parse(rawTag.replace(/^v/, ''))
|
||||
if (!semverTag) {
|
||||
throw new Error(
|
||||
`${rawTag} is not a valid semantic version tag, and so cannot be uploaded to the action package.`
|
||||
)
|
||||
}
|
||||
|
||||
return semverTag
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user