mirror of
https://github.com/actions/setup-node.git
synced 2026-03-30 23:10:08 +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':
|
case 'win32':
|
||||||
dataFileName = `win-${osArch}-exe`;
|
dataFileName = `win-${osArch}-exe`;
|
||||||
break;
|
break;
|
||||||
|
case 'aix':
|
||||||
|
dataFileName = `aix-${osArch}`;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unexpected OS '${this.osPlat}'`);
|
throw new Error(`Unexpected OS '${this.osPlat}'`);
|
||||||
}
|
}
|
||||||
@ -72005,9 +72008,17 @@ class BaseDistribution {
|
|||||||
return versions.sort(semver_1.default.rcompare);
|
return versions.sort(semver_1.default.rcompare);
|
||||||
}
|
}
|
||||||
translateArchToDistUrl(arch) {
|
translateArchToDistUrl(arch) {
|
||||||
|
const endianness = os_1.default.endianness().toLowerCase();
|
||||||
switch (arch) {
|
switch (arch) {
|
||||||
case 'arm':
|
case 'arm':
|
||||||
return 'armv7l';
|
return 'armv7l';
|
||||||
|
case 'ppc64':
|
||||||
|
switch (endianness) {
|
||||||
|
case 'le':
|
||||||
|
return 'ppc64le';
|
||||||
|
default:
|
||||||
|
return 'ppc64';
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return arch;
|
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 tc from '@actions/tool-cache';
|
||||||
import * as hc from '@actions/http-client';
|
import * as hc from '@actions/http-client';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
@ -11,7 +11,7 @@ import * as path from 'path';
|
|||||||
import os from 'os';
|
import os from 'os';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
|
||||||
import {NodeInputs, INodeVersion, INodeVersionInfo} from './base-models';
|
import { NodeInputs, INodeVersion, INodeVersionInfo } from './base-models';
|
||||||
|
|
||||||
export default abstract class BaseDistribution {
|
export default abstract class BaseDistribution {
|
||||||
protected httpClient: hc.HttpClient;
|
protected httpClient: hc.HttpClient;
|
||||||
@ -67,7 +67,7 @@ export default abstract class BaseDistribution {
|
|||||||
protected evaluateVersions(versions: string[]): string {
|
protected evaluateVersions(versions: string[]): string {
|
||||||
let version = '';
|
let version = '';
|
||||||
|
|
||||||
const {range, options} = this.validRange(this.nodeInfo.versionSpec);
|
const { range, options } = this.validRange(this.nodeInfo.versionSpec);
|
||||||
|
|
||||||
core.debug(`evaluating ${versions.length} versions`);
|
core.debug(`evaluating ${versions.length} versions`);
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ export default abstract class BaseDistribution {
|
|||||||
const c = semver.clean(versionSpec) || '';
|
const c = semver.clean(versionSpec) || '';
|
||||||
const valid = semver.valid(c) ?? versionSpec;
|
const valid = semver.valid(c) ?? versionSpec;
|
||||||
|
|
||||||
return {range: valid, options};
|
return { range: valid, options };
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async acquireWindowsNodeFromFallbackLocation(
|
protected async acquireWindowsNodeFromFallbackLocation(
|
||||||
@ -262,6 +262,9 @@ export default abstract class BaseDistribution {
|
|||||||
case 'win32':
|
case 'win32':
|
||||||
dataFileName = `win-${osArch}-exe`;
|
dataFileName = `win-${osArch}-exe`;
|
||||||
break;
|
break;
|
||||||
|
case 'aix':
|
||||||
|
dataFileName = `aix-${osArch}`;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unexpected OS '${this.osPlat}'`);
|
throw new Error(`Unexpected OS '${this.osPlat}'`);
|
||||||
}
|
}
|
||||||
@ -285,9 +288,17 @@ export default abstract class BaseDistribution {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected translateArchToDistUrl(arch: string): string {
|
protected translateArchToDistUrl(arch: string): string {
|
||||||
|
const endianness = os.endianness().toLowerCase()
|
||||||
switch (arch) {
|
switch (arch) {
|
||||||
case 'arm':
|
case 'arm':
|
||||||
return 'armv7l';
|
return 'armv7l';
|
||||||
|
case 'ppc64':
|
||||||
|
switch (endianness) {
|
||||||
|
case 'le':
|
||||||
|
return 'ppc64le';
|
||||||
|
default:
|
||||||
|
return 'ppc64';
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return arch;
|
return arch;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user