Code Monkey home page Code Monkey logo

asdf-istioctl's People

Contributors

abatilo avatar rafik8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

asdf-istioctl's Issues

macOS binaries do not have -amd64 or other arch suffix (yet)

As of Nov 2020 installation of istio-v1.{7,8}.x or asdf install istioctl latest fails because the generated download link is invalid.

You are greeted with following error (because curl -L $download_url yields a Not Found string):

$ asdf install istioctl latest --verbose
Downloading istioctl from https://github.com/istio/istio/releases/download/1.7.4/istio-1.7.4-osx-amd64.tar.gz
bin_install_path: /Users/wadkar/.asdf/installs/istioctl/1.7.4/bin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9  100     9    0     0      6      0  0:00:01  0:00:01 --:--:--     6
tar: Error opening archive: Unrecognized archive format

Following patch works on macOS:

M bin/install
@@ -60,13 +60,17 @@ verlt() {
 }
 
 get_arch() {
-  verlt "$1" 1.6.0 && echo "" || echo "-amd64"
+  if [ "$2" = osx ]; then
+    echo ""
+  else
+    verlt "$1" 1.6.0 && echo "" || echo "-amd64"
+  fi
 }
 
 get_download_url() {
   local version="$1"
   local os_dist="$(get_platform)"
-  local arch="$(get_arch $version)"
+  local arch="$(get_arch "$version" "$os_dist")"
   echo "https://github.com/istio/istio/releases/download/${version}/istio-${version}-${os_dist}${arch}.tar.gz"
 }
 

Of course, feel free to flex your shell-foo and shorten the if conditional to your liking.

URL scheme changed in istio 1.6.0

asdf isntall istioctl 1.6.0 doesn't work because istio changed their release naming scheme:

$ asdf install istioctl 1.6.0
Downloading istioctl from https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux.tar.gz
bin_install_path: /home/shosti/.asdf/installs/istioctl/1.6.0/bin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9  100     9    0     0     32      0 --:--:-- --:--:-- --:--:--    32

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

It looks like the correct address is https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux-amd64.tar.gz .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.