GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — adding support for linux-ppc64le · actions/setup-node@35387fe

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • dist/setup
    • index.js
  • src/distributions
    • base-distribution.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎dist/setup/index.js‎

Copy file name to clipboardExpand all lines: dist/setup/index.js
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71988,6 +71988,9 @@ class BaseDistribution {
7198871988
case 'win32':
7198971989
dataFileName = `win-${osArch}-exe`;
7199071990
break;
71991+
case 'aix':
71992+
dataFileName = `aix-${osArch}`;
71993+
break;
7199171994
default:
7199271995
throw new Error(`Unexpected OS '${this.osPlat}'`);
7199371996
}
@@ -72005,9 +72008,17 @@ class BaseDistribution {
7200572008
return versions.sort(semver_1.default.rcompare);
7200672009
}
7200772010
translateArchToDistUrl(arch) {
72011+
const endianness = os_1.default.endianness().toLowerCase();
7200872012
switch (arch) {
7200972013
case 'arm':
7201072014
return 'armv7l';
72015+
case 'ppc64':
72016+
switch (endianness) {
72017+
case 'le':
72018+
return 'ppc64le';
72019+
default:
72020+
return 'ppc64';
72021+
}
7201172022
default:
7201272023
return arch;
7201372024
}
Collapse file

‎src/distributions/base-distribution.ts‎

Copy file name to clipboardExpand all lines: src/distributions/base-distribution.ts
+15-4Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {v4 as uuidv4} from 'uuid';
1+
import { v4 as uuidv4 } from 'uuid';
22
import * as tc from '@actions/tool-cache';
33
import * as hc from '@actions/http-client';
44
import * as core from '@actions/core';
@@ -11,7 +11,7 @@ import * as path from 'path';
1111
import os from 'os';
1212
import fs from 'fs';
1313

14-
import {NodeInputs, INodeVersion, INodeVersionInfo} from './base-models';
14+
import { NodeInputs, INodeVersion, INodeVersionInfo } from './base-models';
1515

1616
export default abstract class BaseDistribution {
1717
protected httpClient: hc.HttpClient;
@@ -67,7 +67,7 @@ export default abstract class BaseDistribution {
6767
protected evaluateVersions(versions: string[]): string {
6868
let version = '';
6969

70-
const {range, options} = this.validRange(this.nodeInfo.versionSpec);
70+
const { range, options } = this.validRange(this.nodeInfo.versionSpec);
7171

7272
core.debug(`evaluating ${versions.length} versions`);
7373

@@ -157,7 +157,7 @@ export default abstract class BaseDistribution {
157157
const c = semver.clean(versionSpec) || '';
158158
const valid = semver.valid(c) ?? versionSpec;
159159

160-
return {range: valid, options};
160+
return { range: valid, options };
161161
}
162162

163163
protected async acquireWindowsNodeFromFallbackLocation(
@@ -262,6 +262,9 @@ export default abstract class BaseDistribution {
262262
case 'win32':
263263
dataFileName = `win-${osArch}-exe`;
264264
break;
265+
case 'aix':
266+
dataFileName = `aix-${osArch}`;
267+
break;
265268
default:
266269
throw new Error(`Unexpected OS '${this.osPlat}'`);
267270
}
@@ -285,9 +288,17 @@ export default abstract class BaseDistribution {
285288
}
286289

287290
protected translateArchToDistUrl(arch: string): string {
291+
const endianness = os.endianness().toLowerCase()
288292
switch (arch) {
289293
case 'arm':
290294
return 'armv7l';
295+
case 'ppc64':
296+
switch (endianness) {
297+
case 'le':
298+
return 'ppc64le';
299+
default:
300+
return 'ppc64';
301+
}
291302
default:
292303
return arch;
293304
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.