Expand node version file support to include lts based codenames

This commit is contained in:
Taylor McCarthy 2020-11-18 22:04:38 -05:00
parent c3812bd36a
commit a0d376d3fa
7 changed files with 311 additions and 43 deletions

View file

@ -4,6 +4,7 @@ import * as auth from './authutil';
import fs = require('fs');
import * as path from 'path';
import {URL} from 'url';
import {parseNodeVersionFile} from './node-version-file';
export async function run() {
try {
@ -21,7 +22,9 @@ export async function run() {
if (!!versionFile) {
const versionFilePath = path.join(__dirname, '..', versionFile);
version = fs.readFileSync(versionFilePath, 'utf8');
version = await parseNodeVersionFile(
fs.readFileSync(versionFilePath, 'utf8')
);
core.info(`Resolved ${versionFile} as ${version}`);
}
}