mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 09:21:00 +00:00
add major support
This commit is contained in:
parent
9b82ea39ef
commit
ccbc0aae4e
2 changed files with 8 additions and 0 deletions
4
dist/setup/index.js
vendored
4
dist/setup/index.js
vendored
|
@ -73416,6 +73416,10 @@ function evaluateVersions(versions, versionSpec) {
|
|||
core.debug(`evaluating ${versions.length} versions`);
|
||||
core.debug(`version 1 is ${versions[0]}`);
|
||||
core.debug(`version spec is ${versionSpec}`);
|
||||
versionSpec =
|
||||
versionSpec.includes('nightly') && !semver.valid(versionSpec.split('-')[0])
|
||||
? versionSpec.split('-')[0]
|
||||
: versionSpec;
|
||||
versions = versions.sort((a, b) => {
|
||||
if (semver.gt(a, b)) {
|
||||
return 1;
|
||||
|
|
|
@ -353,6 +353,10 @@ function evaluateVersions(versions: string[], versionSpec: string): string {
|
|||
core.debug(`evaluating ${versions.length} versions`);
|
||||
core.debug(`version 1 is ${versions[0]}`);
|
||||
core.debug(`version spec is ${versionSpec}`);
|
||||
versionSpec =
|
||||
versionSpec.includes('nightly') && !semver.valid(versionSpec.split('-')[0])
|
||||
? versionSpec.split('-')[0]
|
||||
: versionSpec;
|
||||
versions = versions.sort((a, b) => {
|
||||
if (semver.gt(a, b)) {
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue