diff --git a/dist/setup/index.js b/dist/setup/index.js index 655da8d17..85f4f8998 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -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; } diff --git a/src/distributions/base-distribution.ts b/src/distributions/base-distribution.ts index 756cfc5a3..1cf3d0a29 100644 --- a/src/distributions/base-distribution.ts +++ b/src/distributions/base-distribution.ts @@ -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; }