Skip to content

Commit 90a7483

Browse files
authored
Merge pull request #70 from divyansh42/fix-odo
Change odo install location
2 parents 90acd14 + 2ba65a0 commit 90a7483

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

dist/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mirror-client-finder/directory-finder.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export async function findClientDir(client: InstallableClient, desiredVersionRan
3535

3636
const BASE_URL_V3 = "https://mirror.openshift.com/pub/openshift-v3/clients/";
3737
const BASE_URL_V4 = "https://mirror.openshift.com/pub/openshift-v4/clients/";
38+
const DEVELOPERS_BASE_URL = "https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/";
3839

3940
function resolveBaseDownloadDir(client: InstallableClient, desiredVersionRange: semver.Range): string {
4041
if (isOCV3(client, desiredVersionRange)) {
@@ -45,8 +46,12 @@ function resolveBaseDownloadDir(client: InstallableClient, desiredVersionRange:
4546
const clientDirOverride = ClientDetailOverrides[client]?.mirror?.directoryName;
4647
const clientDir = clientDirOverride || client;
4748

48-
const clientDirUrl = `${BASE_URL_V4 + clientDir}/`;
49+
let clientDirUrl = `${BASE_URL_V4 + clientDir}/`;
4950

51+
// odo moved to the new location, more details here https://github.com/redhat-actions/openshift-tools-installer/issues/66
52+
if (client === "odo") {
53+
clientDirUrl = `${DEVELOPERS_BASE_URL + clientDir}/`;
54+
}
5055
// ghCore.info(`Resolved base download dir for ${client} to ${clientDirUrl}`);
5156

5257
return clientDirUrl;

0 commit comments

Comments
 (0)