looztra / asdf-k9s Goto Github PK
View Code? Open in Web Editor NEWasdf plugin to install k9s
License: Apache License 2.0
asdf plugin to install k9s
License: Apache License 2.0
Thanks!
On May 20th, 2021, K9s version 0.24.10 has released. The naming scheme for the provided archives has changed to include the version number: k9s_<os>_<arch>.tar.gz
became k9s_<version>_<os>_<arch>.tar.gz
. Following this, asdf
can't download the correct file.
$ asdf install k9s 0.24.10
[2021-05-21 12:34:22] INFO: Downloading [k9s] from https://github.com/derailed/k9s/releases/download/v0.24.10/k9s_Linux_x86_64.tar.gz to /tmp/asdf_uzRbtoA7/sub/k9s_Linux_x86_64.tar.gz (install_tool)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9 100 9 0 0 32 0 --:--:-- --:--:-- --:--:-- 32
[2021-05-21 12:34:22] INFO: Creating bin directory [/home/user/.asdf/installs/k9s/0.24.10/bin] (install_tool)
[2021-05-21 12:34:23] INFO: Cleaning previous binaries if any (install_tool)
[2021-05-21 12:34:23] INFO: Extracting archive (install_tool)
tar: This does not look like a tar archive
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
My installed plugin commit is fff3ad67085177c0b96cff34eb608c05799bf350
.
k9s has a different naming scheme in version 0.27.0 for the 64 bit linux version: (was - 0.26.7) k9s_Linux_x86_64.tar.gz -- (now -- 0.27.0) k9s_Linux_amd64.tar.gz.
With the current version of this plugin, a download of k9s 0.27.0 is impossible.
I already filed a bug in k9s but they asked me to create a report here.
the wrong url is generated because the version is not present in the filename for recent versions.
From aaab22905c7d6017483be0f1d58f2344a66de207 Mon Sep 17 00:00:00 2001
From: Georg vom Endt <[email protected]>
Date: Tue, 25 Feb 2020 01:39:25 +0100
Subject: [PATCH] this intents to fix 404 while fetching
this plugins tries to fetch
https://github.com/derailed/k9s/releases/download/v0.16.1/k9s_v0.16.1_Linux_x86_64.tar.gz
while it should fetch
https://github.com/derailed/k9s/releases/download/v0.16.1/k9s_Linux_x86_64.tar.gz
currently
---
bin/install | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/bin/install b/bin/install
index 59a6073..e38f5bf 100755
--- a/bin/install
+++ b/bin/install
@@ -18,7 +18,7 @@ install_tool() {
platform=$(get_platform)
download_url=$(get_download_url "$version" "$platform" "$binary_name")
- download_path="$tmp_download_dir/"$(get_filename "$version" "$platform" "$binary_name")
+ download_path="$tmp_download_dir/"$(get_filename "$platform" "$binary_name")
echo "Downloading [${binary_name}] from ${download_url} to ${download_path}"
curl -Lo "$download_path" "$download_url"
@@ -51,11 +51,10 @@ get_platform() {
}
get_filename() {
- local version="$1"
- local platform="$2"
- local binary_name="$3"
+ local platform="$1"
+ local binary_name="$2"
- echo "${binary_name}_${version}_${platform}.tar.gz"
+ echo "${binary_name}_${platform}.tar.gz"
}
get_download_url() {
@@ -63,7 +62,7 @@ get_download_url() {
local platform="$2"
local binary_name="$3"
local filename
- filename="$(get_filename "$version" "$platform" "$binary_name")"
+ filename="$(get_filename "$platform" "$binary_name")"
echo "https://github.com/derailed/k9s/releases/download/${version}/${filename}"
}
--
2.20.1
the patch above should fix it
Maybe it's a regression since the 0.26.7
arm64
version can be installed on Mac M1 correctly.
$ sw_vers
ProductName: macOS
ProductVersion: 13.2
BuildVersion: 22D49
$ uname -a
Darwin **** 22.3.0 Darwin Kernel Version 22.3.0: Thu Jan 5 20:49:43 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T8103 arm64
$ asdf install k9s 0.27.0
[2023-01-30 00:47:34] INFO: Downloading [k9s] from
https://github.com/derailed/k9s/releases/download/v0.27.0/k9s_darwin_amd64.tar.gz to
/var/folders/gd/****/T/asdf_XXXXXXXX.jdhdXIxN/sub/k9s_darwin_amd64.tar.gz (install_tool)
[2023-01-30 00:47:43] INFO: Creating bin directory [/Users/****/.asdf/installs/k9s/0.27.0/bin] (install_tool)
[2023-01-30 00:47:43] INFO: Cleaning previous binaries if any (install_tool)
[2023-01-30 00:47:43] INFO: Extracting archive (install_tool)
[2023-01-30 00:47:43] INFO: Copying binaries (install_tool)
Hi,
I tried to install the latest version and I got an erro
❯ asdf plugin-add k9s https://github.com/looztra/asdf-k9s
∴ asdf install k9s latst
/home/uda/.asdf/plugins/k9s/bin/install: line 74: ((: 10#latst: value too great for base (error token is "10#latst")
/home/uda/.asdf/plugins/k9s/bin/install: line 77: ((: 10#latst: value too great for base (error token is "10#latst")
/home/uda/.asdf/plugins/k9s/bin/install: line 74: ((: 10#latst: value too great for base (error token is "10#latst")
/home/uda/.asdf/plugins/k9s/bin/install: line 77: ((: 10#latst: value too great for base (error token is "10#latst")
/home/uda/.asdf/plugins/k9s/bin/install: line 74: ((: 10#latst: value too great for base (error token is "10#latst")
/home/uda/.asdf/plugins/k9s/bin/install: line 77: ((: 10#latst: value too great for base (error token is "10#latst")
/home/uda/.asdf/plugins/k9s/bin/install: line 74: ((: 10#latst: value too great for base (error token is "10#latst")
/home/uda/.asdf/plugins/k9s/bin/install: line 77: ((: 10#latst: value too great for base (error token is "10#latst")
[2023-07-11 19:46:25] INFO: Downloading [k9s] from https://github.com/derailed/k9s/releases/download/latst/k9s_latst_Linux_x86_64.tar.gz to /tmp/asdf_cZGbvFTT/sub/k9s_Linux_x86_64.tar.gz (install_tool)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9 100 9 0 0 30 0 --:--:-- --:--:-- --:--:-- 30
[2023-07-11 19:46:26] INFO: Creating bin directory [/home/uda/.asdf/installs/k9s/latst/bin] (install_tool)
[2023-07-11 19:46:26] INFO: Cleaning previous binaries if any (install_tool)
[2023-07-11 19:46:26] INFO: Extracting archive (install_tool)
tar: This does not look like a tar archive
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Seems like there is a 'v' in the path now, even though the version tar doesn't have that 'v'.
Plugin tries to download:
https://github.com/derailed/k9s/releases/download/0.13.6/k9s_0.13.6_Linux_x86_64.tar.gz
Release is:
https://github.com/derailed/k9s/releases/download/v0.13.6/k9s_0.13.6_Linux_x86_64.tar.gz
Arch renamed from x86_64 to amd64
Original issue: derailed/k9s#1901
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.