Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mirror-url parameter to allow downloading Node.js from a custom URL #1211

Closed
wants to merge 26 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
checklatest
  • Loading branch information
aparnajyothi-y committed Jan 30, 2025
commit 630895f2486b958207df0bc8eccc387de08d6731
3 changes: 3 additions & 0 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
@@ -100666,11 +100666,14 @@ class OfficialBuilds extends base_distribution_1.default {
downloadFromMirrorURL() {
return __awaiter(this, void 0, void 0, function* () {
const nodeJsVersions = yield this.getNodeJsVersions();
core.info('versions from nodeJSVersions' + nodeJsVersions);
const versions = this.filterVersions(nodeJsVersions);
core.info('versions' + versions);
const evaluatedVersion = this.evaluateVersions(versions);
if (this.nodeInfo.checkLatest) {
const evaluatedVersion = yield this.findVersionInDist(nodeJsVersions);
this.nodeInfo.versionSpec = evaluatedVersion;
core.info('versionSpec' + this.nodeInfo.versionSpec);
}
if (!evaluatedVersion) {
throw new Error(`Unable to find Node version '${this.nodeInfo.versionSpec}' for platform ${this.osPlat} and architecture ${this.nodeInfo.arch}.`);
5 changes: 5 additions & 0 deletions src/distributions/official_builds/official_builds.ts
Original file line number Diff line number Diff line change
@@ -315,12 +315,17 @@ export default class OfficialBuilds extends BaseDistribution {

protected async downloadFromMirrorURL() {
const nodeJsVersions = await this.getNodeJsVersions();
core.info('versions from nodeJSVersions'+nodeJsVersions);
const versions = this.filterVersions(nodeJsVersions);
core.info('versions'+versions);

const evaluatedVersion = this.evaluateVersions(versions);

if (this.nodeInfo.checkLatest) {
const evaluatedVersion = await this.findVersionInDist(nodeJsVersions);
this.nodeInfo.versionSpec = evaluatedVersion;
core.info('versionSpec'+this.nodeInfo.versionSpec);

}

if (!evaluatedVersion) {