Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package arkade for openSUSE:Factory checked in at 2023-07-27 16:52:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/arkade (Old) and /work/SRC/openSUSE:Factory/.arkade.new.32662 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "arkade" Thu Jul 27 16:52:24 2023 rev:12 rq:1100955 version:0.9.25 Changes: -------- --- /work/SRC/openSUSE:Factory/arkade/arkade.changes 2023-07-06 18:30:06.967666954 +0200 +++ /work/SRC/openSUSE:Factory/.arkade.new.32662/arkade.changes 2023-07-27 16:52:39.290440181 +0200 @@ -1,0 +2,13 @@ +Wed Jul 26 12:51:43 UTC 2023 - ka...@b1-systems.de + +- Update to version 0.9.25: + * Comment out kubestr due to invalid release + * Fix tests for new K0s format + * Add test for existing K0s app + * Bump github.com/cheggaaa/pb/v3 from 3.1.2 to 3.1.4 + * update readme + * fix eksctl installation & tests + * fix tests for kubens + * fix helm for darwin arm + +------------------------------------------------------------------- Old: ---- arkade-0.9.24.obscpio New: ---- arkade-0.9.25.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ arkade.spec ++++++ --- /var/tmp/diff_new_pack.CFAVWv/_old 2023-07-27 16:52:40.178445199 +0200 +++ /var/tmp/diff_new_pack.CFAVWv/_new 2023-07-27 16:52:40.186445244 +0200 @@ -19,7 +19,7 @@ %define __arch_install_post export NO_BRP_STRIP_DEBUG=true Name: arkade -Version: 0.9.24 +Version: 0.9.25 Release: 0 Summary: Open Source Kubernetes Marketplace License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.CFAVWv/_old 2023-07-27 16:52:40.226445470 +0200 +++ /var/tmp/diff_new_pack.CFAVWv/_new 2023-07-27 16:52:40.230445492 +0200 @@ -3,7 +3,7 @@ <param name="url">https://github.com/alexellis/arkade</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">0.9.24</param> + <param name="revision">0.9.25</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.CFAVWv/_old 2023-07-27 16:52:40.254445628 +0200 +++ /var/tmp/diff_new_pack.CFAVWv/_new 2023-07-27 16:52:40.258445651 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/alexellis/arkade</param> - <param name="changesrevision">a4dd6013ddcd55eb470776694a398f856afb47e4</param></service></servicedata> + <param name="changesrevision">12d550be7c95d0b9959e9396772af834763b6b4d</param></service></servicedata> (No newline at EOF) ++++++ arkade-0.9.24.obscpio -> arkade-0.9.25.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.24/README.md new/arkade-0.9.25/README.md --- old/arkade-0.9.24/README.md 2023-07-05 10:34:51.000000000 +0200 +++ new/arkade-0.9.25/README.md 2023-07-25 16:14:35.000000000 +0200 @@ -17,24 +17,47 @@ With over 120 CLIs and 55 Kubernetes apps (charts, manifests, installers) available for Kubernetes, gone are the days of contending with dozens of README files just to set up a development stack with the usual suspects like ingress-nginx, Postgres and cert-manager. -- [arkade - The Open Source Kubernetes Marketplace](#arkade---the-open-source-kubernetes-marketplace) - - [Help fund arkade](#help-fund-arkade-) +- [arkade - Open Source Marketplace For Developer Tools](#arkade---open-source-marketplace-for-developer-tools) + - [Support arkade ð](#support-arkade-) - [Should you try arkade?](#should-you-try-arkade) - [Getting arkade](#getting-arkade) - [Usage overview](#usage-overview) - [Download CLI tools with arkade](#download-cli-tools-with-arkade) + - [Install System Packages](#install-system-packages) - [Install CLIs during CI with GitHub Actions](#install-clis-during-ci-with-github-actions) - [Verify and upgrade images in Helm charts](#verify-and-upgrade-images-in-helm-charts) - - [Install System Packages](#install-system-packages) + - [Upgrade images within a Helm chart](#upgrade-images-within-a-helm-chart) + - [Verify images within a helm chart](#verify-images-within-a-helm-chart) - [Installing apps with arkade](#installing-apps-with-arkade) - - [Community & contributing](#community--contributing) + - [Create a Kubernetes cluster](#create-a-kubernetes-cluster) + - [Install a Kubernetes app](#install-a-kubernetes-app) + - [Uninstall an app](#uninstall-an-app) + - [Reduce the repetition](#reduce-the-repetition) + - [Say goodbye to values.yaml and hello to flags](#say-goodbye-to-valuesyaml-and-hello-to-flags) + - [Override with `--set`](#override-with---set) + - [Compounding apps](#compounding-apps) + - [Get a self-hosted TLS registry with authentication](#get-a-self-hosted-tls-registry-with-authentication) + - [Get a public IP for a private cluster and your IngressController](#get-a-public-ip-for-a-private-cluster-and-your-ingresscontroller) + - [Explore the apps](#explore-the-apps) + - [Community \& contributing](#community--contributing) + - [Tutorials \& community blog posts](#tutorials--community-blog-posts) + - [Watch a video walk-through by Alex Ellis](#watch-a-video-walk-through-by-alex-ellis) + - [Featured tutorials](#featured-tutorials) + - [Official blog posts](#official-blog-posts) + - [Community posts](#community-posts) + - [Suggest a new app](#suggest-a-new-app) - [Sponsored apps](#sponsored-apps) - [FAQ](#faq) - - See also: - -- [Catalog of CLI tools](#catalog-of-clis) -- [Catalog of Kubernetes apps](#catalog-of-apps) + - [How does `arkade` compare to `helm`?](#how-does-arkade-compare-to-helm) + - [Is arkade suitable for production use?](#is-arkade-suitable-for-production-use) + - [What is in scope for `arkade get`?](#what-is-in-scope-for-arkade-get) + - [Automatic download of tools](#automatic-download-of-tools) + - [Improving the code or fixing an issue](#improving-the-code-or-fixing-an-issue) + - [Join us on Slack](#join-us-on-slack) + - [License](#license) + - [Catalog of apps and CLIs](#catalog-of-apps-and-clis) + - [Catalog of Apps](#catalog-of-apps) + - [Catalog of CLIs](#catalog-of-clis) ## Support arkade ð @@ -711,7 +734,6 @@ | [bun](https://github.com/oven-sh/bun) | Bun is an incredibly fast JavaScript runtime, bundler, transpiler and package manager â all in one. | | [butane](https://github.com/coreos/butane) | Translates human readable Butane Configs into machine readable Ignition Configs | | [caddy](https://github.com/caddyserver/caddy) | Caddy is an extensible server platform that uses TLS by default | -| [cilium](https://github.com/cilium/cilium-cli) | The cilium CLI. | | [cilium](https://github.com/cilium/cilium-cli) | CLI to install, manage & troubleshoot Kubernetes clusters running Cilium. | | [civo](https://github.com/civo/cli) | CLI for interacting with your Civo resources. | | [clusterawsadm](https://github.com/kubernetes-sigs/cluster-api-provider-aws) | Kubernetes Cluster API Provider AWS Management Utility | @@ -728,7 +750,7 @@ | [dive](https://github.com/wagoodman/dive) | A tool for exploring each layer in a docker image | | [docker-compose](https://github.com/docker/compose) | Define and run multi-container applications with Docker. | | [doctl](https://github.com/digitalocean/doctl) | Official command line interface for the DigitalOcean API. | -| [eksctl](https://github.com/weaveworks/eksctl) | Amazon EKS Kubernetes cluster management | +| [eksctl](https://github.com/eksctl-io/eksctl) | Amazon EKS Kubernetes cluster management | | [eksctl-anywhere](https://github.com/aws/eks-anywhere) | Run Amazon EKS on your own infrastructure | | [faas-cli](https://github.com/openfaas/faas-cli) | Official CLI for OpenFaaS. | | [firectl](https://github.com/firecracker-microvm/firectl) | Command-line tool that lets you run arbitrary Firecracker MicroVMs | @@ -817,7 +839,7 @@ | [run-job](https://github.com/alexellis/run-job) | Run a Kubernetes Job and get the logs when it's done. | | [scaleway-cli](https://github.com/scaleway/scaleway-cli) | Scaleway CLI is a tool to help you pilot your Scaleway infrastructure directly from your terminal. | | [seaweedfs](https://github.com/seaweedfs/seaweedfs) | SeaweedFS is a fast distributed storage system for blobs, objects, files, and data lake, for billions of files! | -| [sops](https://github.com/mozilla/sops) | Simple and flexible tool for managing secrets | +| [sops](https://github.com/getsops/sops) | Simple and flexible tool for managing secrets | | [stern](https://github.com/stern/stern) | Multi pod and container log tailing for Kubernetes. | | [syft](https://github.com/anchore/syft) | CLI tool and library for generating a Software Bill of Materials from container images and filesystems | | [talosctl](https://github.com/siderolabs/talos) | The command-line tool for managing Talos Linux OS. | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.24/go.mod new/arkade-0.9.25/go.mod --- old/arkade-0.9.24/go.mod 2023-07-05 10:34:51.000000000 +0200 +++ new/arkade-0.9.25/go.mod 2023-07-25 16:14:35.000000000 +0200 @@ -5,7 +5,7 @@ require ( github.com/Masterminds/semver v1.5.0 github.com/alexellis/go-execute v0.5.0 - github.com/cheggaaa/pb/v3 v3.1.2 + github.com/cheggaaa/pb/v3 v3.1.4 github.com/docker/go-units v0.5.0 github.com/google/go-containerregistry v0.15.2 github.com/morikuni/aec v1.0.0 @@ -26,13 +26,13 @@ github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker v23.0.5+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect - github.com/fatih/color v1.14.1 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/klauspost/compress v1.16.5 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect - github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc3 // indirect diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.24/go.sum new/arkade-0.9.25/go.sum --- old/arkade-0.9.24/go.sum 2023-07-05 10:34:51.000000000 +0200 +++ new/arkade-0.9.25/go.sum 2023-07-25 16:14:35.000000000 +0200 @@ -5,8 +5,8 @@ github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= github.com/alexellis/go-execute v0.5.0 h1:L8kgNlFzNbJov7jrInlaig7i6ZUSz/tYYmqvb8dyD0s= github.com/alexellis/go-execute v0.5.0/go.mod h1:AgHTcsCF9wrP0mMVTO8N+lFw1Biy71NybBOk8M+qgy8= -github.com/cheggaaa/pb/v3 v3.1.2 h1:FIxT3ZjOj9XJl0U4o2XbEhjFfZl7jCVCDOGq1ZAB7wQ= -github.com/cheggaaa/pb/v3 v3.1.2/go.mod h1:SNjnd0yKcW+kw0brSusraeDd5Bf1zBfxAzTL2ss3yQ4= +github.com/cheggaaa/pb/v3 v3.1.4 h1:DN8j4TVVdKu3WxVwcRKu0sG00IIU6FewoABZzXbRQeo= +github.com/cheggaaa/pb/v3 v3.1.4/go.mod h1:6wVjILNBaXMs8c21qRiaUM8BR82erfgau1DQ4iUXmSA= github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -24,8 +24,8 @@ github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-containerregistry v0.15.2 h1:MMkSh+tjSdnmJZO7ljvEqV1DjfekB6VUEAZgy3a+TQE= github.com/google/go-containerregistry v0.15.2/go.mod h1:wWK+LnOv4jXMM23IT/F1wdYftGWGr47Is8CG+pmHK1Q= @@ -40,11 +40,11 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= +github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= @@ -96,6 +96,7 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.24/pkg/get/get_test.go new/arkade-0.9.25/pkg/get/get_test.go --- old/arkade-0.9.24/pkg/get/get_test.go 2023-07-05 10:34:51.000000000 +0200 +++ new/arkade-0.9.25/pkg/get/get_test.go 2023-07-25 16:14:35.000000000 +0200 @@ -474,7 +474,7 @@ if err != nil { t.Fatal(err) } - want := "https://github.com/ahmetb/kubectx/releases/download/v0.9.4/kubens" + want := "https://github.com/ahmetb/kubectx/releases/download/v0.9.5/kubens" if got != want { t.Fatalf("want: %s, got: %s", want, got) } @@ -632,6 +632,33 @@ } } +func Test_DownloadK0s(t *testing.T) { + tools := MakeTools() + name := "k0s" + + tool := getTool(name, tools) + + tests := []test{ + {os: "linux", + arch: arch64bit, + version: "v1.27.4+k0s.0", + url: "https://github.com/k0sproject/k0s/releases/download/v1.27.4+k0s.0/k0s-v1.27.4+k0s.0-amd64"}, + {os: "linux", + arch: "aarch64", + version: "v1.27.4+k0s.0", + url: "https://github.com/k0sproject/k0s/releases/download/v1.27.4+k0s.0/k0s-v1.27.4+k0s.0-arm64"}, + } + for _, tc := range tests { + got, err := tool.GetURL(tc.os, tc.arch, tc.version, false) + if err != nil { + t.Fatal(err) + } + if got != tc.url { + t.Fatalf("want:\n%q, got:\n%q", tc.url, got) + } + } +} + func Test_DownloadDevspace(t *testing.T) { tools := MakeTools() name := "devspace" @@ -1017,27 +1044,27 @@ {os: "mingw64_nt-10.0-18362", arch: arch64bit, version: toolVersion, - url: "https://github.com/weaveworks/eksctl/releases/download/v0.79.0/eksctl_Windows_amd64.zip"}, + url: "https://github.com/eksctl-io/eksctl/releases/download/v0.79.0/eksctl_Windows_amd64.zip"}, {os: "linux", arch: arch64bit, version: toolVersion, - url: "https://github.com/weaveworks/eksctl/releases/download/v0.79.0/eksctl_Linux_amd64.tar.gz"}, + url: "https://github.com/eksctl-io/eksctl/releases/download/v0.79.0/eksctl_Linux_amd64.tar.gz"}, {os: "linux", arch: archARM64, version: toolVersion, - url: "https://github.com/weaveworks/eksctl/releases/download/v0.79.0/eksctl_Linux_arm64.tar.gz"}, + url: "https://github.com/eksctl-io/eksctl/releases/download/v0.79.0/eksctl_Linux_arm64.tar.gz"}, {os: "darwin", arch: archDarwinARM64, version: toolVersion, - url: "https://github.com/weaveworks/eksctl/releases/download/v0.79.0/eksctl_Darwin_arm64.tar.gz"}, + url: "https://github.com/eksctl-io/eksctl/releases/download/v0.79.0/eksctl_Darwin_arm64.tar.gz"}, {os: "darwin", arch: arch64bit, version: toolVersion, - url: "https://github.com/weaveworks/eksctl/releases/download/v0.79.0/eksctl_Darwin_amd64.tar.gz"}, + url: "https://github.com/eksctl-io/eksctl/releases/download/v0.79.0/eksctl_Darwin_amd64.tar.gz"}, {os: "linux", arch: archARM7, version: toolVersion, - url: "https://github.com/weaveworks/eksctl/releases/download/v0.79.0/eksctl_Linux_armv7.tar.gz"}, + url: "https://github.com/eksctl-io/eksctl/releases/download/v0.79.0/eksctl_Linux_armv7.tar.gz"}, } for _, tc := range tests { @@ -2401,7 +2428,7 @@ os: "darwin", arch: archARM64, version: "3.5.4", - url: `https://get.helm.sh/helm-3.5.4-darwin-amd64.tar.gz`, + url: `https://get.helm.sh/helm-3.5.4-darwin-arm64.tar.gz`, }, } @@ -2880,57 +2907,59 @@ } } -func Test_DownloadKubestr(t *testing.T) { - tools := MakeTools() - name := "kubestr" - v := "v0.4.31" - tool := getTool(name, tools) +// Commented out due to: https://github.com/kastenhq/kubestr/issues/160 - tests := []test{ - { - os: "darwin", - arch: arch64bit, - version: v, - url: `https://github.com/kastenhq/kubestr/releases/download/v0.4.31/kubestr_0.4.31_MacOS_amd64.tar.gz`, - }, - { - os: "darwin", - arch: archDarwinARM64, - version: v, - url: `https://github.com/kastenhq/kubestr/releases/download/v0.4.31/kubestr_0.4.31_MacOS_arm64.tar.gz`, - }, - { - os: "linux", - arch: arch64bit, - version: v, - url: `https://github.com/kastenhq/kubestr/releases/download/v0.4.31/kubestr_0.4.31_Linux_amd64.tar.gz`, - }, - { - os: "linux", - arch: archARM64, - version: v, - url: `https://github.com/kastenhq/kubestr/releases/download/v0.4.31/kubestr_0.4.31_Linux_arm64.tar.gz`, - }, - { - os: "ming", - arch: arch64bit, - version: v, - url: `https://github.com/kastenhq/kubestr/releases/download/v0.4.31/kubestr_0.4.31_Windows_amd64.tar.gz`, - }, - } - - for _, tc := range tests { - t.Run(tc.os+" "+tc.arch+" "+tc.version, func(r *testing.T) { - got, err := tool.GetURL(tc.os, tc.arch, tc.version, false) - if err != nil { - t.Fatal(err) - } - if got != tc.url { - t.Errorf("want: %s, got: %s", tc.url, got) - } - }) - } -} +// func Test_DownloadKubestr(t *testing.T) { +// tools := MakeTools() +// name := "kubestr" +// v := "v0.4.31" +// tool := getTool(name, tools) + +// tests := []test{ +// { +// os: "darwin", +// arch: arch64bit, +// version: v, +// url: `https://github.com/kastenhq/kubestr/releases/download/v0.4.31/kubestr_0.4.31_MacOS_amd64.tar.gz`, +// }, +// { +// os: "darwin", +// arch: archDarwinARM64, +// version: v, +// url: `https://github.com/kastenhq/kubestr/releases/download/v0.4.31/kubestr_0.4.31_MacOS_arm64.tar.gz`, +// }, +// { +// os: "linux", +// arch: arch64bit, +// version: v, +// url: `https://github.com/kastenhq/kubestr/releases/download/v0.4.31/kubestr_0.4.31_Linux_amd64.tar.gz`, +// }, +// { +// os: "linux", +// arch: archARM64, +// version: v, +// url: `https://github.com/kastenhq/kubestr/releases/download/v0.4.31/kubestr_0.4.31_Linux_arm64.tar.gz`, +// }, +// { +// os: "ming", +// arch: arch64bit, +// version: v, +// url: `https://github.com/kastenhq/kubestr/releases/download/v0.4.31/kubestr_0.4.31_Windows_amd64.tar.gz`, +// }, +// } + +// for _, tc := range tests { +// t.Run(tc.os+" "+tc.arch+" "+tc.version, func(r *testing.T) { +// got, err := tool.GetURL(tc.os, tc.arch, tc.version, false) +// if err != nil { +// t.Fatal(err) +// } +// if got != tc.url { +// t.Errorf("want: %s, got: %s", tc.url, got) +// } +// }) +// } +// } func Test_DownloadK10multicluster(t *testing.T) { tools := MakeTools() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.24/pkg/get/tools.go new/arkade-0.9.25/pkg/get/tools.go --- old/arkade-0.9.24/pkg/get/tools.go 2023-07-05 10:34:51.000000000 +0200 +++ new/arkade-0.9.25/pkg/get/tools.go 2023-07-25 16:14:35.000000000 +0200 @@ -56,27 +56,25 @@ Name: "helm", VersionStrategy: "github", Description: "The Kubernetes Package Manager: Think of it like apt/yum/homebrew for Kubernetes.", - URLTemplate: `{{$arch := "amd64"}} - -{{- if eq .Arch "armv7l" -}} -{{$arch = "arm"}} -{{- end -}} - -{{- if eq .OS "linux" -}} - {{- if eq .Arch "aarch64" -}} - {{$arch = "arm64"}} - {{- end -}} -{{- end -}} + URLTemplate: ` + {{$os := .OS}} + {{$arch := .Arch}} + {{$ext := "tar.gz"}} -{{$os := .OS}} -{{$ext := "tar.gz"}} + {{- if (or (eq .Arch "aarch64") (eq .Arch "arm64")) -}} + {{$arch = "arm64"}} + {{- else if eq .Arch "x86_64" -}} + {{ $arch = "amd64" }} + {{- else if eq .Arch "armv7l" -}} + {{ $arch = "arm" }} + {{- end -}} -{{ if HasPrefix .OS "ming" -}} -{{$os = "windows"}} -{{$ext = "zip"}} -{{- end -}} + {{ if HasPrefix .OS "ming" -}} + {{$os = "windows"}} + {{$ext = "zip"}} + {{- end -}} -https://get.helm.sh/helm-{{.Version}}-{{$os}}-{{$arch}}.{{$ext}}`, + https://get.helm.sh/helm-{{.Version}}-{{$os}}-{{$arch}}.{{$ext}}`, }) tools = append(tools, @@ -628,7 +626,7 @@ tools = append(tools, Tool{ - Owner: "weaveworks", + Owner: "eksctl-io", Repo: "eksctl", Name: "eksctl", Description: "Amazon EKS Kubernetes cluster management", @@ -1862,35 +1860,36 @@ BinaryTemplate: `{{.Name}}`, }) - tools = append(tools, - Tool{ - Owner: "kastenhq", - Repo: "kubestr", - Name: "kubestr", - Description: "Kubestr discovers, validates and evaluates your Kubernetes storage options.", - - URLTemplate: ` -{{ $ext := "tar.gz" }} -{{ $osStr := "Linux" }} -{{ $arch := .Arch }} - -{{- if eq .Arch "x86_64" -}} -{{$arch = "amd64"}} -{{- end -}} - -{{- if eq .Arch "aarch64" -}} -{{$arch = "arm64"}} -{{- end -}} - -{{- if eq .OS "darwin" -}} -{{ $osStr = "MacOS" }} -{{- else if HasPrefix .OS "ming" -}} -{{ $osStr = "Windows" }} -{{- end -}} - -https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}_{{.VersionNumber}}_{{$osStr}}_{{$arch}}.{{$ext}}`, - BinaryTemplate: `{{.Name}}`, - }) + // Commented out due to: https://github.com/kastenhq/kubestr/issues/160 + // tools = append(tools, + // Tool{ + // Owner: "kastenhq", + // Repo: "kubestr", + // Name: "kubestr", + // Description: "Kubestr discovers, validates and evaluates your Kubernetes storage options.", + + // URLTemplate: ` + // {{ $ext := "tar.gz" }} + // {{ $osStr := "Linux" }} + // {{ $arch := .Arch }} + + // {{- if eq .Arch "x86_64" -}} + // {{$arch = "amd64"}} + // {{- end -}} + + // {{- if eq .Arch "aarch64" -}} + // {{$arch = "arm64"}} + // {{- end -}} + + // {{- if eq .OS "darwin" -}} + // {{ $osStr = "MacOS" }} + // {{- else if HasPrefix .OS "ming" -}} + // {{ $osStr = "Windows" }} + // {{- end -}} + + // https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}_{{.VersionNumber}}_{{$osStr}}_{{$arch}}.{{$ext}}`, + // BinaryTemplate: `{{.Name}}`, + // }) tools = append(tools, Tool{ ++++++ arkade.obsinfo ++++++ --- /var/tmp/diff_new_pack.CFAVWv/_old 2023-07-27 16:52:40.446446713 +0200 +++ /var/tmp/diff_new_pack.CFAVWv/_new 2023-07-27 16:52:40.450446735 +0200 @@ -1,5 +1,5 @@ name: arkade -version: 0.9.24 -mtime: 1688546091 -commit: a4dd6013ddcd55eb470776694a398f856afb47e4 +version: 0.9.25 +mtime: 1690294475 +commit: 12d550be7c95d0b9959e9396772af834763b6b4d ++++++ vendor.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/cheggaaa/pb/v3/pool_win.go new/vendor/github.com/cheggaaa/pb/v3/pool_win.go --- old/vendor/github.com/cheggaaa/pb/v3/pool_win.go 2023-07-06 11:42:22.000000000 +0200 +++ new/vendor/github.com/cheggaaa/pb/v3/pool_win.go 2023-07-26 14:51:44.000000000 +0200 @@ -1,3 +1,4 @@ +//go:build windows // +build windows package pb @@ -5,6 +6,7 @@ import ( "fmt" "log" + "strings" "github.com/cheggaaa/pb/v3/termutil" ) @@ -24,17 +26,25 @@ } coords.X = 0 - err = termutil.SetCursorPos(coords) + err = termutil.SetCursorPos(coords) if err != nil { log.Panic(err) } } + cols, err := termutil.TerminalWidth() + if err != nil { + cols = defaultBarWidth + } isFinished := true for _, bar := range p.bars { if !bar.IsFinished() { isFinished = false } - out += fmt.Sprintf("\r%s\n", bar.String()) + result := bar.String() + if r := cols - CellCount(result); r > 0 { + result += strings.Repeat(" ", r) + } + out += fmt.Sprintf("\r%s\n", result) } if p.Output != nil { fmt.Fprint(p.Output, out) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/cheggaaa/pb/v3/pool_x.go new/vendor/github.com/cheggaaa/pb/v3/pool_x.go --- old/vendor/github.com/cheggaaa/pb/v3/pool_x.go 2023-07-06 11:42:22.000000000 +0200 +++ new/vendor/github.com/cheggaaa/pb/v3/pool_x.go 2023-07-26 14:51:44.000000000 +0200 @@ -1,3 +1,4 @@ +//go:build linux || darwin || freebsd || netbsd || openbsd || solaris || dragonfly || plan9 || aix // +build linux darwin freebsd netbsd openbsd solaris dragonfly plan9 aix package pb @@ -5,6 +6,7 @@ import ( "fmt" "os" + "strings" "github.com/cheggaaa/pb/v3/termutil" ) @@ -31,7 +33,11 @@ isFinished = false } bar.SetWidth(cols) - out += fmt.Sprintf("\r%s\n", bar.String()) + result := bar.String() + if r := cols - CellCount(result); r > 0 { + result += strings.Repeat(" ", r) + } + out += fmt.Sprintf("\r%s\n", result) } if p.Output != nil { fmt.Fprint(p.Output, out) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/fatih/color/color_windows.go new/vendor/github.com/fatih/color/color_windows.go --- old/vendor/github.com/fatih/color/color_windows.go 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/github.com/fatih/color/color_windows.go 2023-07-26 14:51:44.000000000 +0200 @@ -0,0 +1,19 @@ +package color + +import ( + "os" + + "golang.org/x/sys/windows" +) + +func init() { + // Opt-in for ansi color support for current process. + // https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#output-sequences + var outMode uint32 + out := windows.Handle(os.Stdout.Fd()) + if err := windows.GetConsoleMode(out, &outMode); err != nil { + return + } + outMode |= windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING + _ = windows.SetConsoleMode(out, outMode) +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mattn/go-runewidth/.travis.yml new/vendor/github.com/mattn/go-runewidth/.travis.yml --- old/vendor/github.com/mattn/go-runewidth/.travis.yml 2023-07-06 11:42:23.000000000 +0200 +++ new/vendor/github.com/mattn/go-runewidth/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -language: go -sudo: false -go: - - 1.13.x - - tip - -before_install: - - go get -t -v ./... - -script: - - go generate - - git diff --cached --exit-code - - ./go.test.sh - -after_success: - - bash <(curl -s https://codecov.io/bash) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mattn/go-runewidth/README.md new/vendor/github.com/mattn/go-runewidth/README.md --- old/vendor/github.com/mattn/go-runewidth/README.md 2023-07-06 11:42:23.000000000 +0200 +++ new/vendor/github.com/mattn/go-runewidth/README.md 2023-07-26 14:51:44.000000000 +0200 @@ -1,7 +1,7 @@ go-runewidth ============ -[](https://travis-ci.org/mattn/go-runewidth) +[](https://github.com/mattn/go-runewidth/actions?query=workflow%3Atest) [](https://codecov.io/gh/mattn/go-runewidth) [](http://godoc.org/github.com/mattn/go-runewidth) [](https://goreportcard.com/report/github.com/mattn/go-runewidth) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mattn/go-runewidth/go.test.sh new/vendor/github.com/mattn/go-runewidth/go.test.sh --- old/vendor/github.com/mattn/go-runewidth/go.test.sh 2023-07-06 11:42:23.000000000 +0200 +++ new/vendor/github.com/mattn/go-runewidth/go.test.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -echo "" > coverage.txt - -for d in $(go list ./... | grep -v vendor); do - go test -race -coverprofile=profile.out -covermode=atomic "$d" - if [ -f profile.out ]; then - cat profile.out >> coverage.txt - rm profile.out - fi -done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mattn/go-runewidth/runewidth.go new/vendor/github.com/mattn/go-runewidth/runewidth.go --- old/vendor/github.com/mattn/go-runewidth/runewidth.go 2023-07-06 11:42:23.000000000 +0200 +++ new/vendor/github.com/mattn/go-runewidth/runewidth.go 2023-07-26 14:51:44.000000000 +0200 @@ -2,6 +2,7 @@ import ( "os" + "strings" "github.com/rivo/uniseg" ) @@ -34,7 +35,13 @@ EastAsianWidth = env == "1" } // update DefaultCondition - DefaultCondition.EastAsianWidth = EastAsianWidth + if DefaultCondition.EastAsianWidth != EastAsianWidth { + DefaultCondition.EastAsianWidth = EastAsianWidth + if len(DefaultCondition.combinedLut) > 0 { + DefaultCondition.combinedLut = DefaultCondition.combinedLut[:0] + CreateLUT() + } + } } type interval struct { @@ -89,6 +96,7 @@ // Condition have flag EastAsianWidth whether the current locale is CJK or not. type Condition struct { + combinedLut []byte EastAsianWidth bool StrictEmojiNeutral bool } @@ -104,10 +112,16 @@ // RuneWidth returns the number of cells in r. // See http://www.unicode.org/reports/tr11/ func (c *Condition) RuneWidth(r rune) int { + if r < 0 || r > 0x10FFFF { + return 0 + } + if len(c.combinedLut) > 0 { + return int(c.combinedLut[r>>1]>>(uint(r&1)*4)) & 3 + } // optimized version, verified by TestRuneWidthChecksums() if !c.EastAsianWidth { switch { - case r < 0x20 || r > 0x10FFFF: + case r < 0x20: return 0 case (r >= 0x7F && r <= 0x9F) || r == 0xAD: // nonprint return 0 @@ -124,7 +138,7 @@ } } else { switch { - case r < 0 || r > 0x10FFFF || inTables(r, nonprint, combining): + case inTables(r, nonprint, combining): return 0 case inTable(r, narrow): return 1 @@ -138,6 +152,27 @@ } } +// CreateLUT will create an in-memory lookup table of 557056 bytes for faster operation. +// This should not be called concurrently with other operations on c. +// If options in c is changed, CreateLUT should be called again. +func (c *Condition) CreateLUT() { + const max = 0x110000 + lut := c.combinedLut + if len(c.combinedLut) != 0 { + // Remove so we don't use it. + c.combinedLut = nil + } else { + lut = make([]byte, max/2) + } + for i := range lut { + i32 := int32(i * 2) + x0 := c.RuneWidth(i32) + x1 := c.RuneWidth(i32 + 1) + lut[i] = uint8(x0) | uint8(x1)<<4 + } + c.combinedLut = lut +} + // StringWidth return width as you can see func (c *Condition) StringWidth(s string) (width int) { g := uniseg.NewGraphemes(s) @@ -180,11 +215,47 @@ return s[:pos] + tail } +// TruncateLeft cuts w cells from the beginning of the `s`. +func (c *Condition) TruncateLeft(s string, w int, prefix string) string { + if c.StringWidth(s) <= w { + return prefix + } + + var width int + pos := len(s) + + g := uniseg.NewGraphemes(s) + for g.Next() { + var chWidth int + for _, r := range g.Runes() { + chWidth = c.RuneWidth(r) + if chWidth > 0 { + break // See StringWidth() for details. + } + } + + if width+chWidth > w { + if width < w { + _, pos = g.Positions() + prefix += strings.Repeat(" ", width+chWidth-w) + } else { + pos, _ = g.Positions() + } + + break + } + + width += chWidth + } + + return prefix + s[pos:] +} + // Wrap return string wrapped with w cells func (c *Condition) Wrap(s string, w int) string { width := 0 out := "" - for _, r := range []rune(s) { + for _, r := range s { cw := c.RuneWidth(r) if r == '\n' { out += string(r) @@ -257,6 +328,11 @@ return DefaultCondition.Truncate(s, w, tail) } +// TruncateLeft cuts w cells from the beginning of the `s`. +func TruncateLeft(s string, w int, prefix string) string { + return DefaultCondition.TruncateLeft(s, w, prefix) +} + // Wrap return string wrapped with w cells func Wrap(s string, w int) string { return DefaultCondition.Wrap(s, w) @@ -271,3 +347,12 @@ func FillRight(s string, w int) string { return DefaultCondition.FillRight(s, w) } + +// CreateLUT will create an in-memory lookup table of 557055 bytes for faster operation. +// This should not be called concurrently with other operations. +func CreateLUT() { + if len(DefaultCondition.combinedLut) > 0 { + return + } + DefaultCondition.CreateLUT() +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mattn/go-runewidth/runewidth_appengine.go new/vendor/github.com/mattn/go-runewidth/runewidth_appengine.go --- old/vendor/github.com/mattn/go-runewidth/runewidth_appengine.go 2023-07-06 11:42:23.000000000 +0200 +++ new/vendor/github.com/mattn/go-runewidth/runewidth_appengine.go 2023-07-26 14:51:44.000000000 +0200 @@ -1,3 +1,4 @@ +//go:build appengine // +build appengine package runewidth diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mattn/go-runewidth/runewidth_js.go new/vendor/github.com/mattn/go-runewidth/runewidth_js.go --- old/vendor/github.com/mattn/go-runewidth/runewidth_js.go 2023-07-06 11:42:23.000000000 +0200 +++ new/vendor/github.com/mattn/go-runewidth/runewidth_js.go 2023-07-26 14:51:44.000000000 +0200 @@ -1,5 +1,5 @@ -// +build js -// +build !appengine +//go:build js && !appengine +// +build js,!appengine package runewidth diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mattn/go-runewidth/runewidth_posix.go new/vendor/github.com/mattn/go-runewidth/runewidth_posix.go --- old/vendor/github.com/mattn/go-runewidth/runewidth_posix.go 2023-07-06 11:42:23.000000000 +0200 +++ new/vendor/github.com/mattn/go-runewidth/runewidth_posix.go 2023-07-26 14:51:44.000000000 +0200 @@ -1,6 +1,5 @@ -// +build !windows -// +build !js -// +build !appengine +//go:build !windows && !js && !appengine +// +build !windows,!js,!appengine package runewidth diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mattn/go-runewidth/runewidth_windows.go new/vendor/github.com/mattn/go-runewidth/runewidth_windows.go --- old/vendor/github.com/mattn/go-runewidth/runewidth_windows.go 2023-07-06 11:42:23.000000000 +0200 +++ new/vendor/github.com/mattn/go-runewidth/runewidth_windows.go 2023-07-26 14:51:44.000000000 +0200 @@ -1,5 +1,5 @@ -// +build windows -// +build !appengine +//go:build windows && !appengine +// +build windows,!appengine package runewidth diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/modules.txt new/vendor/modules.txt --- old/vendor/modules.txt 2023-07-06 11:42:23.000000000 +0200 +++ new/vendor/modules.txt 2023-07-26 14:51:44.000000000 +0200 @@ -7,7 +7,7 @@ # github.com/alexellis/go-execute v0.5.0 ## explicit; go 1.16 github.com/alexellis/go-execute/pkg/v1 -# github.com/cheggaaa/pb/v3 v3.1.2 +# github.com/cheggaaa/pb/v3 v3.1.4 ## explicit; go 1.17 github.com/cheggaaa/pb/v3 github.com/cheggaaa/pb/v3/termutil @@ -34,7 +34,7 @@ # github.com/docker/go-units v0.5.0 ## explicit github.com/docker/go-units -# github.com/fatih/color v1.14.1 +# github.com/fatih/color v1.15.0 ## explicit; go 1.17 github.com/fatih/color # github.com/google/go-containerregistry v0.15.2 @@ -84,10 +84,10 @@ # github.com/mattn/go-colorable v0.1.13 ## explicit; go 1.15 github.com/mattn/go-colorable -# github.com/mattn/go-isatty v0.0.17 +# github.com/mattn/go-isatty v0.0.19 ## explicit; go 1.15 github.com/mattn/go-isatty -# github.com/mattn/go-runewidth v0.0.13 +# github.com/mattn/go-runewidth v0.0.14 ## explicit; go 1.9 github.com/mattn/go-runewidth # github.com/mitchellh/go-homedir v1.1.0