mirror of
https://github.com/actions/setup-node.git
synced 2025-06-29 22:23:47 +00:00
Release from master
This commit is contained in:
parent
5273d0df9c
commit
8de2f9fcbc
34 changed files with 371 additions and 293 deletions
|
@ -28,6 +28,9 @@ function writeRegistryToFile(registryUrl, fileLocation) {
|
|||
if (scope && scope[0] != '@') {
|
||||
scope = '@' + scope;
|
||||
}
|
||||
if (scope) {
|
||||
scope = scope.toLowerCase();
|
||||
}
|
||||
core.debug(`Setting auth in ${fileLocation}`);
|
||||
let newContents = '';
|
||||
if (fs.existsSync(fileLocation)) {
|
||||
|
|
|
@ -103,7 +103,7 @@ function queryLatestMatch(versionSpec) {
|
|||
}
|
||||
let versions = [];
|
||||
let dataUrl = 'https://nodejs.org/dist/index.json';
|
||||
let rest = new restm.RestClient('vsts-node-tool');
|
||||
let rest = new restm.RestClient('setup-node');
|
||||
let nodeVersions = (yield rest.get(dataUrl)).result || [];
|
||||
nodeVersions.forEach((nodeVersion) => {
|
||||
// ensure this version supports your os and platform
|
||||
|
|
|
@ -26,7 +26,10 @@ function run() {
|
|||
// Version is optional. If supplied, install / use from the tool cache
|
||||
// If not supplied then task is still used to setup proxy, auth, etc...
|
||||
//
|
||||
const version = core.getInput('version');
|
||||
let version = core.getInput('version');
|
||||
if (!version) {
|
||||
version = core.getInput('node-version');
|
||||
}
|
||||
if (version) {
|
||||
// TODO: installer doesn't support proxy
|
||||
yield installer.getNode(version);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue