mirror of
https://github.com/actions/setup-node.git
synced 2025-07-26 08:28:23 +02:00
Expand node version file support to include lts based codenames
This commit is contained in:
parent
c3812bd36a
commit
a0d376d3fa
7 changed files with 311 additions and 43 deletions
|
@ -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}`);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue