add major support

This commit is contained in:
Dmitry Shibanov 2022-10-13 17:07:36 +02:00
parent 9b82ea39ef
commit ccbc0aae4e
2 changed files with 8 additions and 0 deletions

4
dist/setup/index.js vendored
View File

@ -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;

View File

@ -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;