mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix helm downloading on windows
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
d1a7e034d7
commit
2d4d8e35c9
3 files changed
+54
-36
No files matched your search
+44
-25
@@ -154,11 +154,6 @@ class HelmDownloader extends BinaryDownloader {
|
||||
|
||||
type SupportedPlatform = "darwin" | "linux" | "windows";
|
||||
|
||||
interface SupportedArch {
|
||||
downloadArch: string;
|
||||
fileArch: string;
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const multiBar = new MultiBar({
|
||||
align: "left",
|
||||
@@ -169,44 +164,68 @@ async function main() {
|
||||
format: "[{bar}] {percentage}% | {downloadArch} {binaryName}",
|
||||
});
|
||||
const baseDir = path.join(__dirname, "..", "binaries", "client");
|
||||
const supportedArchitectures: SupportedArch[] = [
|
||||
{
|
||||
const downloaders: BinaryDownloader[] = [
|
||||
new LensK8sProxyDownloader({
|
||||
version: packageInfo.config.k8sProxyVersion,
|
||||
platform: normalizedPlatform,
|
||||
downloadArch: "amd64",
|
||||
fileArch: "x64",
|
||||
},
|
||||
normalizedPlatform === "windows"
|
||||
? {
|
||||
downloadArch: "386",
|
||||
fileArch: "ia32",
|
||||
}
|
||||
: {
|
||||
downloadArch: "arm64",
|
||||
fileArch: "arm64",
|
||||
},
|
||||
baseDir,
|
||||
}, multiBar),
|
||||
new KubectlDownloader({
|
||||
version: packageInfo.config.bundledKubectlVersion,
|
||||
platform: normalizedPlatform,
|
||||
downloadArch: "amd64",
|
||||
fileArch: "x64",
|
||||
baseDir,
|
||||
}, multiBar),
|
||||
new HelmDownloader({
|
||||
version: packageInfo.config.bundledHelmVersion,
|
||||
platform: normalizedPlatform,
|
||||
downloadArch: "amd64",
|
||||
fileArch: "x64",
|
||||
baseDir,
|
||||
}, multiBar),
|
||||
];
|
||||
const downloaders: BinaryDownloader[] = [];
|
||||
|
||||
for (const { downloadArch, fileArch } of supportedArchitectures) {
|
||||
if (normalizedPlatform === "windows") {
|
||||
downloaders.push(
|
||||
new LensK8sProxyDownloader({
|
||||
version: packageInfo.config.k8sProxyVersion,
|
||||
platform: normalizedPlatform,
|
||||
downloadArch,
|
||||
fileArch,
|
||||
downloadArch: "386",
|
||||
fileArch: "ia32",
|
||||
baseDir,
|
||||
}, multiBar),
|
||||
new KubectlDownloader({
|
||||
version: packageInfo.config.bundledKubectlVersion,
|
||||
platform: normalizedPlatform,
|
||||
downloadArch,
|
||||
fileArch,
|
||||
downloadArch: "386",
|
||||
fileArch: "ia32",
|
||||
baseDir,
|
||||
}, multiBar),
|
||||
);
|
||||
} else {
|
||||
downloaders.push(
|
||||
new LensK8sProxyDownloader({
|
||||
version: packageInfo.config.k8sProxyVersion,
|
||||
platform: normalizedPlatform,
|
||||
downloadArch: "arm64",
|
||||
fileArch: "arm64",
|
||||
baseDir,
|
||||
}, multiBar),
|
||||
new KubectlDownloader({
|
||||
version: packageInfo.config.bundledKubectlVersion,
|
||||
platform: normalizedPlatform,
|
||||
downloadArch: "arm64",
|
||||
fileArch: "arm64",
|
||||
baseDir,
|
||||
}, multiBar),
|
||||
new HelmDownloader({
|
||||
version: packageInfo.config.bundledHelmVersion,
|
||||
platform: normalizedPlatform,
|
||||
downloadArch,
|
||||
fileArch,
|
||||
downloadArch: "arm64",
|
||||
fileArch: "arm64",
|
||||
baseDir,
|
||||
}, multiBar),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user