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