mirror of
https://github.com/actions/setup-node.git
synced 2026-03-25 21:50:19 +00:00
Merge 35387fe005 into 2a017f350d
This commit is contained in:
commit
1c3f77e8d2
11
dist/setup/index.js
vendored
11
dist/setup/index.js
vendored
@ -71988,6 +71988,9 @@ class BaseDistribution {
|
||||
case 'win32':
|
||||
dataFileName = `win-${osArch}-exe`;
|
||||
break;
|
||||
case 'aix':
|
||||
dataFileName = `aix-${osArch}`;
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unexpected OS '${this.osPlat}'`);
|
||||
}
|
||||
@ -72005,9 +72008,17 @@ class BaseDistribution {
|
||||
return versions.sort(semver_1.default.rcompare);
|
||||
}
|
||||
translateArchToDistUrl(arch) {
|
||||
const endianness = os_1.default.endianness().toLowerCase();
|
||||
switch (arch) {
|
||||
case 'arm':
|
||||
return 'armv7l';
|
||||
case 'ppc64':
|
||||
switch (endianness) {
|
||||
case 'le':
|
||||
return 'ppc64le';
|
||||
default:
|
||||
return 'ppc64';
|
||||
}
|
||||
default:
|
||||
return arch;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import * as tc from '@actions/tool-cache';
|
||||
import * as hc from '@actions/http-client';
|
||||
import * as core from '@actions/core';
|
||||
@ -11,7 +11,7 @@ import * as path from 'path';
|
||||
import os from 'os';
|
||||
import fs from 'fs';
|
||||
|
||||
import {NodeInputs, INodeVersion, INodeVersionInfo} from './base-models';
|
||||
import { NodeInputs, INodeVersion, INodeVersionInfo } from './base-models';
|
||||
|
||||
export default abstract class BaseDistribution {
|
||||
protected httpClient: hc.HttpClient;
|
||||
@ -67,7 +67,7 @@ export default abstract class BaseDistribution {
|
||||
protected evaluateVersions(versions: string[]): string {
|
||||
let version = '';
|
||||
|
||||
const {range, options} = this.validRange(this.nodeInfo.versionSpec);
|
||||
const { range, options } = this.validRange(this.nodeInfo.versionSpec);
|
||||
|
||||
core.debug(`evaluating ${versions.length} versions`);
|
||||
|
||||
@ -157,7 +157,7 @@ export default abstract class BaseDistribution {
|
||||
const c = semver.clean(versionSpec) || '';
|
||||
const valid = semver.valid(c) ?? versionSpec;
|
||||
|
||||
return {range: valid, options};
|
||||
return { range: valid, options };
|
||||
}
|
||||
|
||||
protected async acquireWindowsNodeFromFallbackLocation(
|
||||
@ -262,6 +262,9 @@ export default abstract class BaseDistribution {
|
||||
case 'win32':
|
||||
dataFileName = `win-${osArch}-exe`;
|
||||
break;
|
||||
case 'aix':
|
||||
dataFileName = `aix-${osArch}`;
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unexpected OS '${this.osPlat}'`);
|
||||
}
|
||||
@ -285,9 +288,17 @@ export default abstract class BaseDistribution {
|
||||
}
|
||||
|
||||
protected translateArchToDistUrl(arch: string): string {
|
||||
const endianness = os.endianness().toLowerCase()
|
||||
switch (arch) {
|
||||
case 'arm':
|
||||
return 'armv7l';
|
||||
case 'ppc64':
|
||||
switch (endianness) {
|
||||
case 'le':
|
||||
return 'ppc64le';
|
||||
default:
|
||||
return 'ppc64';
|
||||
}
|
||||
default:
|
||||
return arch;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user