Expand current syntax to support aliases for latest version (current/latest/node) (#483)

This commit is contained in:
Milos Pantic authored and GitHub committed 2022-05-12 17:26:02 +02:00
1 parent b067f78ed3
commit 17f8bd9264
5 files changed
+75

No files matched your search

+6
View File
@@ -62587,6 +62587,12 @@ function queryDistForMatch(versionSpec, arch = os.arch()) {
}
let versions = [];
let nodeVersions = yield getVersionsFromDist();
if (versionSpec === 'current' ||
versionSpec === 'latest' ||
versionSpec === 'node') {
core.info(`getting latest node version...`);
return nodeVersions[0].version;
}
nodeVersions.forEach((nodeVersion) => {
// ensure this version supports your os and platform
if (nodeVersion.files.indexOf(dataFileName) >= 0) {