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-06-14 16:29:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/arkade (Old) and /work/SRC/openSUSE:Factory/.arkade.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "arkade" Wed Jun 14 16:29:27 2023 rev:9 rq:1092920 version:0.9.22 Changes: -------- --- /work/SRC/openSUSE:Factory/arkade/arkade.changes 2023-05-30 22:02:51.091154963 +0200 +++ /work/SRC/openSUSE:Factory/.arkade.new.15902/arkade.changes 2023-06-14 16:30:38.546948789 +0200 @@ -1,0 +2,43 @@ +Tue Jun 13 11:04:00 UTC 2023 - ka...@b1-systems.de + +- Update to version 0.9.22: + * Remove duplicate cilium tool and add unit test + * Add failing test to find duplicate tools + +------------------------------------------------------------------- +Tue Jun 13 11:02:27 UTC 2023 - ka...@b1-systems.de + +- Update to version 0.9.21: + * Add cilium CLI to arkade + * add copa to arkade get + +------------------------------------------------------------------- +Tue Jun 13 10:59:49 UTC 2023 - ka...@b1-systems.de + +- Update to version 0.9.20: + * feat: add atuin shell history tool and update catalog of CLIs + +------------------------------------------------------------------- +Tue Jun 13 10:58:30 UTC 2023 - ka...@b1-systems.de + +- Update to version 0.9.19: + * add openshift tools + * Update README.md + * add buildkitd and gitlab-runner to system-install in README.md + * add kube-burner + * Fixes #918 move from stedolan/jq to jqlang/jq + * fix: add ming to clusterctl + +------------------------------------------------------------------- +Tue Jun 13 10:57:17 UTC 2023 - ka...@b1-systems.de + +- Update to version 0.9.18: + * Add example into README and edit pull request template + * Download binaries to separate temp directory + * remove arch 386 for arkade get helmfile + * add buildkitd to system install + * add replicated-cli to arkade get + * Bump github.com/docker/distribution + * Bump github.com/otiai10/copy from 1.10.0 to 1.11.0 + +------------------------------------------------------------------- Old: ---- arkade-0.9.17.obscpio New: ---- arkade-0.9.22.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ arkade.spec ++++++ --- /var/tmp/diff_new_pack.XURqYI/_old 2023-06-14 16:30:39.710955944 +0200 +++ /var/tmp/diff_new_pack.XURqYI/_new 2023-06-14 16:30:39.714955969 +0200 @@ -19,7 +19,7 @@ %define __arch_install_post export NO_BRP_STRIP_DEBUG=true Name: arkade -Version: 0.9.17 +Version: 0.9.22 Release: 0 Summary: Open Source Kubernetes Marketplace License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.XURqYI/_old 2023-06-14 16:30:39.746956165 +0200 +++ /var/tmp/diff_new_pack.XURqYI/_new 2023-06-14 16:30:39.750956190 +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.17</param> + <param name="revision">0.9.22</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.XURqYI/_old 2023-06-14 16:30:39.770956313 +0200 +++ /var/tmp/diff_new_pack.XURqYI/_new 2023-06-14 16:30:39.774956337 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/alexellis/arkade</param> - <param name="changesrevision">b8c2f3b8a5e95332ea226315809da70c2ab1e015</param></service></servicedata> + <param name="changesrevision">ab3f8aa2a12aa2f3407e8150b5bdea97fd582a6e</param></service></servicedata> (No newline at EOF) ++++++ arkade-0.9.17.obscpio -> arkade-0.9.22.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/.github/PULL_REQUEST_TEMPLATE.md new/arkade-0.9.22/.github/PULL_REQUEST_TEMPLATE.md --- old/arkade-0.9.17/.github/PULL_REQUEST_TEMPLATE.md 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/.github/PULL_REQUEST_TEMPLATE.md 2023-06-10 10:16:57.000000000 +0200 @@ -23,7 +23,7 @@ ## Documentation -- [ ] I have updated the list of tools in README.md if (required) with `./arkade get -o markdown` +- [ ] I have updated the list of tools in README.md if (required) with `./arkade get --format markdown` - [ ] I have updated the list of apps in README.md if (required) with `./arkade install --help` ## Checklist: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/CONTRIBUTING.md new/arkade-0.9.22/CONTRIBUTING.md --- old/arkade-0.9.17/CONTRIBUTING.md 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/CONTRIBUTING.md 2023-06-10 10:16:57.000000000 +0200 @@ -26,8 +26,8 @@ To add the sign-off, simply run: ```bash -git commit --global user.name "Full Name" -git commit --global user.email "y...@example.com" +git config --global user.name "Full Name" +git config --global user.email "y...@example.com" git commit -s / --signoff ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/README.md new/arkade-0.9.22/README.md --- old/arkade-0.9.17/README.md 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/README.md 2023-06-10 10:16:57.000000000 +0200 @@ -7,7 +7,10 @@ <img src="docs/arkade-logo-sm.png" alt="arkade logo" width="150" height="150"> [](https://github.com/sponsors/alexellis) -[](https://github.com/alexellis/arkade/actions/workflows/build.yml) + + +[](https://github.com/alexellis/arkade/actions/workflows/build.yml) +[](https://github.com/alexellis/arkade/actions/workflows/e2e-url-checker.yml) [](https://godoc.org/github.com/alexellis/arkade) [](https://opensource.org/licenses/MIT)  @@ -162,6 +165,20 @@ ``` > This is a time saver compared to searching for download pages every time you > need a tool. +Files are stored at `$HOME/.arkade/bin/` + +Want to download tools to a custom path such as into the GitHub Actions cached tool folder? + +```bash +arkade get faas-cli kubectl \ + --path $HOME/runner/_work/_tools + +# Usage: +/runner/_work/_tools/faas-cli version + +PATH=$PATH:$HOME/runner/_work/_tools +faas-cli version +``` Think of `arkade get TOOL` as a doing for CLIs, what `arkade install` does for helm. @@ -200,9 +217,11 @@ ``` actions-runner Install GitHub Actions Runner + buildkitd Install Buildkitd cni Install CNI plugins containerd Install containerd firecracker Install Firecracker + gitlab-runner Install Gitlab Runner go Install Go node Install Node.js prometheus Install Prometheus @@ -214,24 +233,11 @@ ## Install CLIs during CI with GitHub Actions -There are two GitHub Actions available for arkade - -* [alexellis/setup-arkade@master](https://github.com/alexellis/setup-arkade) - -```yaml - - uses: alexellis/setup-arkade@v2 - - name: Install kubectl & Helm - run: arkade get - kubectl \ - helm -``` - * [alexellis/arkade-get@master](https://github.com/alexellis/arkade-get) Example downloading faas-cli (specific version) and kubectl (latest), putting them into the PATH automatically, and executing one of them in a subsequent step. ```yaml - - uses: alexellis/setup-arkade@v2 - uses: alexellis/arkade-get@master with: kubectl: latest @@ -241,6 +247,18 @@ faas-cli version ``` +If you just need system applications, you could also try "setup-arkade": + +* [alexellis/setup-arkade@master](https://github.com/alexellis/setup-arkade) + +```yaml + - uses: alexellis/setup-arkade@v2 + - name: Install containerd and go + run: | + arkade system install containerd + arkade system install go +``` + ## Verify and upgrade images in Helm charts There are two commands built into arkade designed for software vendors and open source maintainers. @@ -687,17 +705,20 @@ | [argocd](https://github.com/argoproj/argo-cd) | Declarative, GitOps continuous delivery tool for Kubernetes. | | [argocd-autopilot](https://github.com/argoproj-labs/argocd-autopilot) | An opinionated way of installing Argo-CD and managing GitOps repositories. | | [arkade](https://github.com/alexellis/arkade) | Portable marketplace for downloading your favourite devops CLIs and installing helm charts, with a single command. | +| [atuin](https://github.com/ellie/atuin) | Sync, search and backup shell history with Atuin. | | [autok3s](https://github.com/cnrancher/autok3s) | Run Rancher Lab's lightweight Kubernetes distribution k3s everywhere. | | [buildx](https://github.com/docker/buildx) | Docker CLI plugin for extended build capabilities with BuildKit. | | [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 | | [clusterctl](https://github.com/kubernetes-sigs/cluster-api) | The clusterctl CLI tool handles the lifecycle of a Cluster API management cluster | | [cmctl](https://github.com/cert-manager/cert-manager) | cmctl is a CLI tool that helps you manage cert-manager and its resources inside your cluster. | | [conftest](https://github.com/open-policy-agent/conftest) | Write tests against structured configuration data using the Open Policy Agent Rego query language | +| [copa](https://github.com/project-copacetic/copacetic) | CLI for patching container images | | [cosign](https://github.com/sigstore/cosign) | Container Signing, Verification and Storage in an OCI registry. | | [cr](https://github.com/helm/chart-releaser) | Hosting Helm Charts via GitHub Pages and Releases | | [crane](https://github.com/google/go-containerregistry) | crane is a tool for interacting with remote images and registries | @@ -732,7 +753,7 @@ | [inlets-pro](https://github.com/inlets/inlets-pro) | Cloud Native Tunnel for HTTP and TCP traffic. | | [inletsctl](https://github.com/inlets/inletsctl) | Automates the task of creating an exit-server (tunnel server) on public cloud infrastructure. | | [istioctl](https://github.com/istio/istio) | Service Mesh to establish a programmable, application-aware network using the Envoy service proxy. | -| [jq](https://github.com/stedolan/jq) | jq is a lightweight and flexible command-line JSON processor | +| [jq](https://github.com/jqlang/jq) | jq is a lightweight and flexible command-line JSON processor | | [just](https://github.com/casey/just) | Just a command runner | | [k0s](https://github.com/k0sproject/k0s) | Zero Friction Kubernetes | | [k0sctl](https://github.com/k0sproject/k0sctl) | A bootstrapping and management tool for k0s clusters | @@ -749,7 +770,9 @@ | [kind](https://github.com/kubernetes-sigs/kind) | Run local Kubernetes clusters using Docker container nodes. | | [kops](https://github.com/kubernetes/kops) | Production Grade K8s Installation, Upgrades, and Management. | | [krew](https://github.com/kubernetes-sigs/krew) | Package manager for kubectl plugins. | +| [ktop](https://github.com/vladimirvivien/ktop) | A top-like tool for your Kubernetes cluster. | | [kube-bench](https://github.com/aquasecurity/kube-bench) | Checks whether Kubernetes is deployed securely by running the checks documented in the CIS Kubernetes Benchmark. | +| [kube-burner](https://github.com/cloud-bulldozer/kube-burner) | A tool aimed at stressing Kubernetes clusters by creating or deleting a high quantity of objects. | | [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder) | Framework for building Kubernetes APIs using custom resource definitions (CRDs). | | [kubecm](https://github.com/sunny0826/kubecm) | Easier management of kubeconfig. | | [kubeconform](https://github.com/yannh/kubeconform) | A FAST Kubernetes manifests validator, with support for Custom Resources | @@ -763,7 +786,7 @@ | [kubeval](https://github.com/instrumenta/kubeval) | Validate your Kubernetes configuration files, supports multiple Kubernetes versions | | [kumactl](https://github.com/kumahq/kuma) | kumactl is a CLI to interact with Kuma and its data | | [kustomize](https://github.com/kubernetes-sigs/kustomize) | Customization of kubernetes YAML configurations | -| [kyverno](https://github.com/kyverno/kyverno) | Apply and test Kyverno policies outside a cluster | +| [kyverno](https://github.com/kyverno/kyverno) | CLI to apply and test Kyverno policies outside a cluster. | | [lazygit](https://github.com/jesseduffield/lazygit) | A simple terminal UI for git commands. | | [linkerd2](https://github.com/linkerd/linkerd2) | Ultralight, security-first service mesh for Kubernetes. | | [mc](https://github.com/minio/mc) | MinIO Client is a replacement for ls, cp, mkdir, diff and rsync commands for filesystems and object storage. | @@ -775,8 +798,10 @@ | [nats-server](https://github.com/nats-io/nats-server) | Cloud native message bus and queue server | | [nerdctl](https://github.com/containerd/nerdctl) | Docker-compatible CLI for containerd, with support for Compose | | [nova](https://github.com/FairwindsOps/nova) | Find outdated or deprecated Helm charts running in your cluster. | +| [oc](https://github.com/openshift/oc) | Client to use an OpenShift 4.x cluster. | | [oh-my-posh](https://github.com/jandedobbeleer/oh-my-posh) | A prompt theme engine for any shell that can display kubernetes information. | | [opa](https://github.com/open-policy-agent/opa) | General-purpose policy engine that enables unified, context-aware policy enforcement across the entire stack. | +| [openshift-install](https://github.com/openshift/installer) | CLI to install an OpenShift 4.x cluster. | | [operator-sdk](https://github.com/operator-framework/operator-sdk) | Operator SDK is a tool for scaffolding and generating code for building Kubernetes operators | | [osm](https://github.com/openservicemesh/osm) | Open Service Mesh uniformly manages, secures, and gets out-of-the-box observability features. | | [pack](https://github.com/buildpacks/pack) | Build apps using Cloud Native Buildpacks. | @@ -786,6 +811,7 @@ | [porter](https://github.com/getporter/porter) | With Porter you can package your application artifact, tools, etc. as a bundle that can distribute and install. | | [promtool](https://github.com/prometheus/prometheus) | Prometheus rule tester and debugging utility | | [rekor-cli](https://github.com/sigstore/rekor) | Secure Supply Chain - Transparency Log | +| [replicated](https://github.com/replicatedhq/replicated) | CLI for interacting with the Replicated Vendor API | | [rpk](https://github.com/redpanda-data/redpanda) | Kafka compatible streaming platform for mission critical workloads. | | [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. | @@ -810,7 +836,6 @@ | [waypoint](https://github.com/hashicorp/waypoint) | Easy application deployment for Kubernetes and Amazon ECS | | [yq](https://github.com/mikefarah/yq) | Portable command-line YAML processor. | | [yt-dlp](https://github.com/yt-dlp/yt-dlp) | Fork of youtube-dl with additional features and fixes | -There are 126 tools, use `arkade get NAME` to download one. - +There are 136 tools, use `arkade get NAME` to download one. -> Note to contributors, run `arkade get --output markdown` to generate this list +> Note to contributors, run `arkade get --format markdown` to generate this list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/cmd/apps/istio_app.go new/arkade-0.9.22/cmd/apps/istio_app.go --- old/arkade-0.9.17/cmd/apps/istio_app.go 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/cmd/apps/istio_app.go 2023-06-10 10:16:57.000000000 +0200 @@ -199,8 +199,9 @@ progress bool quiet bool ) + defaultMovePath := "" - outPath, finalName, err := get.Download(tool, arch, clientOS, version, get.DownloadArkadeDir, progress, quiet) + outPath, finalName, err := get.Download(tool, arch, clientOS, version, defaultMovePath, progress, quiet) if err != nil { return err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/cmd/apps/linkerd_app.go new/arkade-0.9.22/cmd/apps/linkerd_app.go --- old/arkade-0.9.17/cmd/apps/linkerd_app.go 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/cmd/apps/linkerd_app.go 2023-06-10 10:16:57.000000000 +0200 @@ -151,7 +151,8 @@ quiet bool ) - outPath, finalName, err := get.Download(tool, arch, clientOS, version, get.DownloadArkadeDir, progress, quiet) + defaultMovePath := "" + outPath, finalName, err := get.Download(tool, arch, clientOS, version, defaultMovePath, progress, quiet) if err != nil { return err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/cmd/apps/osm_app.go new/arkade-0.9.22/cmd/apps/osm_app.go --- old/arkade-0.9.17/cmd/apps/osm_app.go 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/cmd/apps/osm_app.go 2023-06-10 10:16:57.000000000 +0200 @@ -108,8 +108,9 @@ progress bool quiet bool ) + defaultMovePath := "" - outPath, finalName, err := get.Download(tool, arch, clientOS, tool.Version, get.DownloadArkadeDir, progress, quiet) + outPath, finalName, err := get.Download(tool, arch, clientOS, tool.Version, defaultMovePath, progress, quiet) if err != nil { return err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/cmd/get.go new/arkade-0.9.22/cmd/get.go --- old/arkade-0.9.17/cmd/get.go 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/cmd/get.go 2023-06-10 10:16:57.000000000 +0200 @@ -61,21 +61,21 @@ clientArch, clientOS := env.GetClientArch() command.Flags().Bool("progress", true, "Display a progress bar") - command.Flags().StringP("output", "o", "", "Output format of the list of tools (table/markdown/list)") - command.Flags().Bool("stash", true, "When set to true, stash binary in HOME/.arkade/bin/, otherwise store in /tmp/") + command.Flags().StringP("format", "o", "", "Format format of the list of tools (table/markdown/list)") + command.Flags().String("path", "", "Leave empty to store in HOME/.arkade/bin/, otherwise give a path for the resulting binaries") command.Flags().StringP("version", "v", "", "Download a specific version") command.Flags().String("arch", clientArch, "CPU architecture for the tool") command.Flags().String("os", clientOS, "Operating system for the tool") - command.Flags().Bool("quiet", false, "Suppress most additional output") + command.Flags().Bool("quiet", false, "Suppress most additional format") command.RunE = func(cmd *cobra.Command, args []string) error { if len(args) == 0 { - output, _ := command.Flags().GetString("output") + format, _ := command.Flags().GetString("format") - if len(output) > 0 { - if get.TableFormat(output) == get.MarkdownStyle { + if len(format) > 0 { + if get.TableFormat(format) == get.MarkdownStyle { get.CreateToolsTable(tools, get.MarkdownStyle) - } else if get.TableFormat(output) == get.ListStyle { + } else if get.TableFormat(format) == get.ListStyle { for _, r := range tools { fmt.Printf("%s\n", r.Name) } @@ -99,7 +99,7 @@ return err } - stash, _ := command.Flags().GetBool("stash") + movePath, _ := command.Flags().GetString("path") progress, _ := command.Flags().GetBool("progress") quiet, _ := command.Flags().GetBool("quiet") @@ -116,10 +116,7 @@ progress = b } - dlMode := get.DownloadTempDir - if stash { - dlMode = get.DownloadArkadeDir - } + movePath = os.ExpandEnv(movePath) signalChan := make(chan os.Signal, 1) signal.Notify(signalChan, os.Interrupt, syscall.SIGTERM) @@ -136,6 +133,7 @@ if err := get.ValidateArch(arch); err != nil { return err } + operatingSystem, _ := command.Flags().GetString("os") if err := get.ValidateOS(operatingSystem); err != nil { return err @@ -149,7 +147,7 @@ arch, operatingSystem, version, - dlMode, + movePath, progress, quiet) @@ -196,7 +194,7 @@ nl := "" if !quiet { nl = "\n" - msg, err := get.PostInstallationMsg(dlMode, localToolsStore) + msg, err := get.PostInstallationMsg(movePath, localToolsStore) if err != nil { return err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/cmd/system/buildkitd.go new/arkade-0.9.22/cmd/system/buildkitd.go --- old/arkade-0.9.17/cmd/system/buildkitd.go 1970-01-01 01:00:00.000000000 +0100 +++ new/arkade-0.9.22/cmd/system/buildkitd.go 2023-06-10 10:16:57.000000000 +0200 @@ -0,0 +1,109 @@ +// Copyright (c) arkade author(s) 2022. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +package system + +import ( + "fmt" + "os" + "path" + "strings" + + "github.com/alexellis/arkade/pkg/archive" + "github.com/alexellis/arkade/pkg/env" + "github.com/alexellis/arkade/pkg/get" + "github.com/spf13/cobra" +) + +func MakeInstallBuildkitd() *cobra.Command { + command := &cobra.Command{ + Use: "buildkitd", + Short: "Install Buildkitd", + Long: `Install Buildkitd for building container images.`, + Example: ` arkade system install buildkitd + arkade system install buildkitd --version <version>`, + SilenceUsage: true, + } + + command.Flags().StringP("version", "v", "", "The version or leave blank to determine the latest available version") + command.Flags().String("path", "/usr/local/bin", "Installation path, where a buildkitd subfolder will be created") + command.Flags().Bool("progress", true, "Show download progress") + command.Flags().String("arch", "", "CPU architecture i.e. amd64") + + command.PreRunE = func(cmd *cobra.Command, args []string) error { + return nil + } + + command.RunE = func(cmd *cobra.Command, args []string) error { + installPath, _ := cmd.Flags().GetString("path") + version, _ := cmd.Flags().GetString("version") + fmt.Printf("Installing Buildkit to %s\n", installPath) + + installPath = strings.ReplaceAll(installPath, "$HOME", os.Getenv("HOME")) + + if err := os.MkdirAll(installPath, 0755); err != nil && !os.IsExist(err) { + fmt.Printf("Error creating directory %s, error: %s\n", installPath, err.Error()) + } + + arch, osVer := env.GetClientArch() + + if strings.ToLower(osVer) != "linux" { + return fmt.Errorf("this app only supports Linux") + } + + if cmd.Flags().Changed("arch") { + arch, _ = cmd.Flags().GetString("arch") + } + + dlArch := arch + if arch == "x86_64" { + dlArch = "amd64" + } else if arch == "aarch64" { + dlArch = "arm64" + } else if arch == "armv7" || arch == "armv7l" { + dlArch = "arm" + } + + if version == "" { + v, err := get.FindGitHubRelease("moby", "buildkit") + if err != nil { + return err + } + version = v + } else if !strings.HasPrefix(version, "v") { + version = "v" + version + } + + fmt.Printf("Installing version: %s for: %s\n", version, dlArch) + + filename := fmt.Sprintf("buildkit-%s.linux-%s.tar.gz", version, dlArch) + dlURL := fmt.Sprintf(githubDownloadTemplate, "moby", "buildkit", version, filename) + + fmt.Printf("Downloading from: %s\n", dlURL) + + progress, _ := cmd.Flags().GetBool("progress") + outPath, err := get.DownloadFileP(dlURL, progress) + if err != nil { + return err + } + defer os.Remove(outPath) + + fmt.Printf("Downloaded to: %s\n", outPath) + + f, err := os.OpenFile(outPath, os.O_RDONLY, 0644) + if err != nil { + return err + } + defer f.Close() + + fmt.Printf("Unpacking Buildkitd to: %s\n", path.Join(installPath, "buildkitd")) + + if err := archive.Untar(f, installPath, true, true); err != nil { + return err + } + + return nil + } + + return command +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/cmd/system/install.go new/arkade-0.9.22/cmd/system/install.go --- old/arkade-0.9.17/cmd/system/install.go 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/cmd/system/install.go 2023-06-10 10:16:57.000000000 +0200 @@ -31,6 +31,7 @@ command.AddCommand(MakeInstallTCRedirectTap()) command.AddCommand(MakeInstallRegistry()) command.AddCommand(MakeInstallGitLabRunner()) + command.AddCommand((MakeInstallBuildkitd())) return command } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/go.mod new/arkade-0.9.22/go.mod --- old/arkade-0.9.17/go.mod 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/go.mod 2023-06-10 10:16:57.000000000 +0200 @@ -10,7 +10,7 @@ github.com/google/go-containerregistry v0.15.2 github.com/morikuni/aec v1.0.0 github.com/olekukonko/tablewriter v0.0.5 - github.com/otiai10/copy v1.10.0 + github.com/otiai10/copy v1.11.0 github.com/pkg/errors v0.9.1 github.com/sethvargo/go-password v0.2.0 github.com/spf13/cobra v1.7.0 @@ -23,7 +23,7 @@ github.com/VividCortex/ewma v1.2.0 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/docker/cli v23.0.5+incompatible // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect + 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/go.sum new/arkade-0.9.22/go.sum --- old/arkade-0.9.17/go.sum 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/go.sum 2023-06-10 10:16:57.000000000 +0200 @@ -16,8 +16,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/cli v23.0.5+incompatible h1:ufWmAOuD3Vmr7JP2G5K3cyuNC4YZWiAsuDEvFVVDafE= github.com/docker/cli v23.0.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v23.0.5+incompatible h1:DaxtlTJjFSnLOXVNUBU1+6kXGz2lpDoEAH6QoxaSg8k= github.com/docker/docker v23.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= @@ -55,8 +55,8 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8= github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/otiai10/copy v1.10.0 h1:znyI7l134wNg/wDktoVQPxPkgvhDfGCYUasey+h0rDQ= -github.com/otiai10/copy v1.10.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= +github.com/otiai10/copy v1.11.0 h1:OKBD80J/mLBrwnzXqGtFCzprFSGioo30JcmR4APsNwc= +github.com/otiai10/copy v1.11.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/pkg/get/download.go new/arkade-0.9.22/pkg/get/download.go --- old/arkade-0.9.17/pkg/get/download.go 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/pkg/get/download.go 2023-06-10 10:16:57.000000000 +0200 @@ -29,7 +29,7 @@ return "server returned status: 404" } -func Download(tool *Tool, arch, operatingSystem, version string, downloadMode int, displayProgress, quiet bool) (string, string, error) { +func Download(tool *Tool, arch, operatingSystem, version string, movePath string, displayProgress, quiet bool) (string, string, error) { downloadURL, err := GetDownloadURL(tool, strings.ToLower(operatingSystem), @@ -47,6 +47,7 @@ if err != nil { return "", "", err } + if !quiet { fmt.Printf("%s written.\n", outFilePath) } @@ -72,28 +73,34 @@ finalName = finalName + ".exe" } - if downloadMode == DownloadArkadeDir { + var localPath string + + if movePath == "" { _, err := config.InitUserDir() if err != nil { return "", "", err } - localPath := env.LocalBinary(finalName, "") - - if !quiet { - log.Printf("Copying %s to %s\n", outFilePath, localPath) - } - _, err = CopyFile(outFilePath, localPath) - if err != nil { - return "", "", err - } + localPath = env.LocalBinary(finalName, "") + } else { + localPath = filepath.Join(movePath, finalName) + } - outFilePath = localPath + if !quiet { + log.Printf("Copying %s to %s\n", outFilePath, localPath) + } + _, err = CopyFile(outFilePath, localPath) + if err != nil { + return "", "", err } + outFilePath = localPath + return outFilePath, finalName, nil } +// DownloadFile downloads a file to a temporary directory +// and returns the path to the file and any error. func DownloadFileP(downloadURL string, displayProgress bool) (string, error) { return downloadFile(downloadURL, displayProgress) } @@ -126,9 +133,18 @@ _, fileName := path.Split(downloadURL) tmp := os.TempDir() - outFilePath := path.Join(tmp, fileName) + + customTmp, err := os.MkdirTemp(tmp, "arkade-*") + if err != nil { + return "", err + } + + outFilePath := path.Join(customTmp, fileName) wrappedReader := withProgressBar(res.Body, int(res.ContentLength), displayProgress) - out, err := os.Create(outFilePath) + + // Owner/Group read/write/execute + // World - execute + out, err := os.OpenFile(outFilePath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0775) if err != nil { return "", err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/pkg/get/get.go new/arkade-0.9.22/pkg/get/get.go --- old/arkade-0.9.17/pkg/get/get.go 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/pkg/get/get.go 2023-06-10 10:16:57.000000000 +0200 @@ -379,14 +379,13 @@ } // PostInstallationMsg generates installation message after tool has been downloaded -func PostInstallationMsg(dlMode int, localToolsStore []ToolLocal) ([]byte, error) { +func PostInstallationMsg(movePath string, localToolsStore []ToolLocal) ([]byte, error) { t := template.New("Installation Instructions") - if dlMode == DownloadTempDir { + if movePath != "" { t.Parse(`Run the following to copy to install the tool: -chmod +x {{range .}}{{.Path}} {{end}} {{- range . }} sudo install -m 755 {{.Path}} /usr/local/bin/{{.Name}} {{- end}}`) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/pkg/get/get_test.go new/arkade-0.9.22/pkg/get/get_test.go --- old/arkade-0.9.17/pkg/get/get_test.go 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/pkg/get/get_test.go 2023-06-10 10:16:57.000000000 +0200 @@ -35,6 +35,23 @@ return tool } +func Test_MakeSureNoDuplicates(t *testing.T) { + count := map[string]int{} + tools := MakeTools() + dupes := []string{} + + for _, tool := range tools { + count[tool.Name]++ + + if count[tool.Name] > 1 { + dupes = append(dupes, tool.Name) + } + } + if len(dupes) > 0 { + t.Fatalf("Duplicate tools found which will break get-arkade GitHub Action: %v", dupes) + } +} + func Test_MakeSureToolsAreSorted(t *testing.T) { got := Tools{ { @@ -82,12 +99,12 @@ func Test_PostInstallationMsg(t *testing.T) { testCases := []struct { - dlMode int - localToolsStore []ToolLocal - want string + defaultDownloadDir string + localToolsStore []ToolLocal + want string }{ { - dlMode: 1, + defaultDownloadDir: "", localToolsStore: []ToolLocal{ {Name: "yq", Path: "/home/user/.arkade/bin/yq", @@ -108,31 +125,30 @@ sudo mv /home/user/.arkade/bin/jq /usr/local/bin/`, }, { - dlMode: 0, + defaultDownloadDir: "/tmp/bin/", localToolsStore: []ToolLocal{ {Name: "yq", - Path: "/tmp/yq_linux_amd64", + Path: "/tmp/bin/yq_linux_amd64", }, { Name: "jq", - Path: "/tmp/jq-linux64", + Path: "/tmp/bin/jq-linux64", }}, want: `Run the following to copy to install the tool: - -chmod +x /tmp/yq_linux_amd64 /tmp/jq-linux64 -sudo install -m 755 /tmp/yq_linux_amd64 /usr/local/bin/yq -sudo install -m 755 /tmp/jq-linux64 /usr/local/bin/jq`, +sudo install -m 755 /tmp/bin/yq_linux_amd64 /usr/local/bin/yq +sudo install -m 755 /tmp/bin/jq-linux64 /usr/local/bin/jq`, }, } for _, tt := range testCases { t.Run(tt.localToolsStore[0].Name, func(t *testing.T) { - msg, _ := PostInstallationMsg(tt.dlMode, tt.localToolsStore) + defaultDownloadDir := tt.defaultDownloadDir + msg, _ := PostInstallationMsg(defaultDownloadDir, tt.localToolsStore) got := string(msg) if got != tt.want { - t.Errorf("got %q, want %q", got, tt.want) + t.Errorf("got\n%s\n\nwant\n%s", got, tt.want) } }) } @@ -3338,6 +3354,12 @@ version: "v1.0.0", url: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.0/clusterctl-darwin-arm64", }, + { + os: "ming", + arch: arch64bit, + version: "v1.0.0", + url: `https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.0/clusterctl-windows-amd64.exe`, + }, } for _, tc := range tests { @@ -5982,3 +6004,309 @@ } } } + +func Test_DownloadBuildKit(t *testing.T) { + tools := MakeTools() + name := "replicated" + + tool := getTool(name, tools) + + const toolVersion = "v0.45.0" + + tests := []test{ + { + os: "linux", + arch: arch64bit, + version: toolVersion, + url: `https://github.com/replicatedhq/replicated/releases/download/v0.45.0/replicated_0.45.0_linux_amd64.tar.gz`, + }, + { + os: "darwin", + arch: arch64bit, + version: toolVersion, + url: `https://github.com/replicatedhq/replicated/releases/download/v0.45.0/replicated_0.45.0_darwin_all.tar.gz`, + }, + { + os: "darwin", + arch: archARM64, + version: toolVersion, + url: `https://github.com/replicatedhq/replicated/releases/download/v0.45.0/replicated_0.45.0_darwin_all.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_DownloadKtop(t *testing.T) { + tools := MakeTools() + name := "ktop" + + tool := getTool(name, tools) + + const toolVersion = "v0.3.5" + + tests := []test{ + { + os: "linux", + arch: arch64bit, + version: toolVersion, + url: `https://github.com/vladimirvivien/ktop/releases/download/v0.3.5/ktop_v0.3.5_linux_amd64.tar.gz`, + }, + { + os: "darwin", + arch: arch64bit, + version: toolVersion, + url: `https://github.com/vladimirvivien/ktop/releases/download/v0.3.5/ktop_v0.3.5_darwin_amd64.tar.gz`, + }, + { + os: "linux", + arch: archARM64, + version: toolVersion, + url: `https://github.com/vladimirvivien/ktop/releases/download/v0.3.5/ktop_v0.3.5_linux_arm64.tar.gz`, + }, + { + os: "darwin", + arch: archDarwinARM64, + version: toolVersion, + url: `https://github.com/vladimirvivien/ktop/releases/download/v0.3.5/ktop_v0.3.5_darwin_arm64.tar.gz`, + }, + { + os: "linux", + arch: archARM7, + version: toolVersion, + url: `https://github.com/vladimirvivien/ktop/releases/download/v0.3.5/ktop_v0.3.5_linux_armv7.tar.gz`, + }, + } + + 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.Errorf("want: %s, got: %s", tc.url, got) + } + } +} + +func Test_DownloadKubeBurner(t *testing.T) { + tools := MakeTools() + name := "kube-burner" + + tool := getTool(name, tools) + + const toolVersion = "v1.6" + + tests := []test{ + { + os: "linux", + arch: arch64bit, + version: toolVersion, + url: `https://github.com/cloud-bulldozer/kube-burner/releases/download/v1.6/kube-burner-1.6-Linux-x86_64.tar.gz`, + }, + { + os: "darwin", + arch: arch64bit, + version: toolVersion, + url: `https://github.com/cloud-bulldozer/kube-burner/releases/download/v1.6/kube-burner-1.6-Darwin-x86_64.tar.gz`, + }, + { + os: "linux", + arch: archARM64, + version: toolVersion, + url: `https://github.com/cloud-bulldozer/kube-burner/releases/download/v1.6/kube-burner-1.6-Linux-arm64.tar.gz`, + }, + { + os: "darwin", + arch: archDarwinARM64, + version: toolVersion, + url: `https://github.com/cloud-bulldozer/kube-burner/releases/download/v1.6/kube-burner-1.6-Darwin-arm64.tar.gz`, + }, + { + os: "ming", + arch: arch64bit, + version: toolVersion, + url: `https://github.com/cloud-bulldozer/kube-burner/releases/download/v1.6/kube-burner-1.6-Windows-x86_64.zip`, + }, + } + + 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.Errorf("want: %s, got: %s", tc.url, got) + } + } +} + +func Test_DownloadOpenshiftInstall(t *testing.T) { + tools := MakeTools() + name := "openshift-install" + + tool := getTool(name, tools) + + const toolVersion = "4.13.1" + + tests := []test{ + { + os: "linux", + arch: arch64bit, + version: toolVersion, + url: `https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.13.1/openshift-install-linux.tar.gz`, + }, + { + os: "darwin", + arch: arch64bit, + version: toolVersion, + url: `https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.13.1/openshift-install-mac.tar.gz`, + }, + { + os: "linux", + arch: archARM64, + version: toolVersion, + url: `https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.13.1/openshift-install-linux-arm64.tar.gz`, + }, + { + os: "darwin", + arch: archDarwinARM64, + version: toolVersion, + url: `https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.13.1/openshift-install-mac-arm64.tar.gz`, + }, + } + + 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.Errorf("want: %s, got: %s", tc.url, got) + } + } +} + +func Test_DownloadOpenshiftCLI(t *testing.T) { + tools := MakeTools() + name := "oc" + + tool := getTool(name, tools) + + const toolVersion = "4.13.1" + + tests := []test{ + { + os: "linux", + arch: arch64bit, + version: toolVersion, + url: `https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.13.1/openshift-client-linux.tar.gz`, + }, + { + os: "darwin", + arch: arch64bit, + version: toolVersion, + url: `https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.13.1/openshift-client-mac.tar.gz`, + }, + { + os: "linux", + arch: archARM64, + version: toolVersion, + url: `https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.13.1/openshift-client-linux-arm64.tar.gz`, + }, + { + os: "darwin", + arch: archDarwinARM64, + version: toolVersion, + url: `https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.13.1/openshift-client-mac-arm64.tar.gz`, + }, + { + os: "ming", + arch: arch64bit, + version: toolVersion, + url: `https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.13.1/openshift-client-windows.zip`, + }, + } + + 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.Errorf("want: %s, got: %s", tc.url, got) + } + } +} + +func Test_DownloadAtuin(t *testing.T) { + tools := MakeTools() + name := "atuin" + + tool := getTool(name, tools) + + const toolVersion = "v15.0.0" + + tests := []test{ + { + os: "linux", + arch: arch64bit, + version: toolVersion, + url: `https://github.com/ellie/atuin/releases/download/v15.0.0/atuin-v15.0.0-x86_64-unknown-linux-gnu.tar.gz`, + }, + { + os: "darwin", + arch: arch64bit, + version: toolVersion, + url: `https://github.com/ellie/atuin/releases/download/v15.0.0/atuin-v15.0.0-x86_64-apple-darwin.tar.gz`, + }, + } + + 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.Errorf("want: %s, got: %s", tc.url, got) + } + } + +} + +func Test_Copacetic(t *testing.T) { + tools := MakeTools() + name := "copa" + + tool := getTool(name, tools) + + const toolVersion = "v0.2.0" + + test := test{ + os: "linux", + arch: arch64bit, + version: toolVersion, + url: `https://github.com/project-copacetic/copacetic/releases/download/v0.2.0/copa_0.2.0_linux_amd64.tar.gz`, + } + + t.Run(test.os+" "+test.arch+" "+test.version, func(r *testing.T) { + got, err := tool.GetURL(test.os, test.arch, test.version, false) + if err != nil { + t.Fatal(err) + } + if got != test.url { + t.Errorf("want: %s, got: %s", test.url, got) + } + }) + +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/pkg/get/tools.go new/arkade-0.9.22/pkg/get/tools.go --- old/arkade-0.9.17/pkg/get/tools.go 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/pkg/get/tools.go 2023-06-10 10:16:57.000000000 +0200 @@ -85,7 +85,7 @@ Repo: "helmfile", Name: "helmfile", Description: "Deploy Kubernetes Helm Charts", - BinaryTemplate: `{{$arch := "386"}} + BinaryTemplate: `{{$arch := ""}} {{- if eq .Arch "x86_64" -}} {{$arch = "amd64"}} {{- else if or (eq .Arch "aarch64") (eq .Arch "arm64") -}} @@ -102,7 +102,7 @@ tools = append(tools, Tool{ - Owner: "stedolan", + Owner: "jqlang", Repo: "jq", Name: "jq", Description: "jq is a lightweight and flexible command-line JSON processor", @@ -2127,8 +2127,11 @@ Description: "The clusterctl CLI tool handles the lifecycle of a Cluster API management cluster", BinaryTemplate: `{{ $ext := "" }} {{ $osStr := "linux" }} - {{- if eq .OS "darwin" -}} - {{ $osStr = "darwin" }} + {{ if HasPrefix .OS "ming" -}} + {{ $osStr = "windows" }} + {{ $ext = ".exe" }} + {{- else if eq .OS "darwin" -}} + {{ $osStr = "darwin" }} {{- end -}} {{ $archStr := "amd64" }} @@ -3487,5 +3490,198 @@ {{- end -}} https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}-cli_{{.Version}}_{{$os}}_{{$arch}}.{{$extStr}}`, }) + + tools = append(tools, + Tool{ + Owner: "replicatedhq", + Repo: "replicated", + Name: "replicated", + Description: "CLI for interacting with the Replicated Vendor API", + URLTemplate: ` + {{$arch := ""}} + {{ if (or (eq .Arch "x86_64") (eq .Arch "amd64")) -}} + {{$arch = "amd64"}} + {{- end -}} + + {{$osStr := ""}} + {{- if eq .OS "darwin" -}} + {{$osStr = "darwin"}} + {{$arch = "all"}} + {{- else if eq .OS "linux" -}} + {{$osStr = "linux"}} + {{- end -}} + + {{$extStr := "tar.gz"}} + + https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}_{{.VersionNumber}}_{{$osStr}}_{{$arch}}.{{$extStr}}`, + }) + + tools = append(tools, + Tool{ + Owner: "vladimirvivien", + Repo: "ktop", + Name: "ktop", + Description: "A top-like tool for your Kubernetes cluster.", + URLTemplate: ` + {{$arch := .Arch}} + {{ if eq .Arch "x86_64" -}} + {{$arch = "amd64"}} + {{- else if (or (eq .Arch "aarch64") (eq .Arch "arm64")) -}} + {{$arch = "arm64"}} + {{- else if eq .Arch "armv7l" -}} + {{$arch = "armv7"}} + {{- end -}} + + {{$os := .OS}} + {{$ext := "tar.gz"}} + + https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}_{{.Version}}_{{$os}}_{{$arch}}.{{$ext}}`, + }) + + tools = append(tools, + Tool{ + Owner: "cloud-bulldozer", + Repo: "kube-burner", + Name: "kube-burner", + Description: "A tool aimed at stressing Kubernetes clusters by creating or deleting a high quantity of objects.", + BinaryTemplate: ` + {{$os := .OS}} + {{$arch := .Arch}} + {{$ext := "tar.gz"}} + + {{- if eq .OS "darwin" -}} + {{$os = "Darwin"}} + {{- else if eq .OS "linux" -}} + {{ $os = "Linux" }} + {{- else if HasPrefix .OS "ming" -}} + {{$os = "Windows"}} + {{$ext = "zip"}} + {{- end -}} + + {{- if eq .Arch "aarch64" -}} + {{$arch = "arm64"}} + {{- else if eq .Arch "arm64" -}} + {{ $arch = "arm64" }} + {{- else if eq .Arch "x86_64" -}} + {{ $arch = "x86_64" }} + {{- end -}} + + {{.Name}}-{{.VersionNumber}}-{{$os}}-{{$arch}}.{{$ext}} + `, + }) + + tools = append(tools, + Tool{ + Owner: "openshift", + Repo: "installer", + Name: "openshift-install", + Description: "CLI to install an OpenShift 4.x cluster.", + URLTemplate: ` + {{$os := .OS}} + {{$arch := .Arch}} + {{$ext := "tar.gz"}} + {{$version := .VersionNumber}} + + {{- if eq .OS "darwin" -}} + {{$os = "mac"}} + {{- end -}} + + {{- if eq .Arch "aarch64" -}} + {{$arch = "-arm64"}} + {{- else if eq .Arch "arm64" -}} + {{ $arch = "-arm64" }} + {{- else if eq .Arch "x86_64" -}} + {{ $arch = "" }} + {{- end -}} + + {{- if eq .VersionNumber "" -}} + {{$version = "4.13.0"}} + {{- end -}} + + https://mirror.openshift.com/pub/openshift-v4/clients/ocp/{{$version}}/{{.Name}}-{{$os}}{{$arch}}.tar.gz + `, + }) + + tools = append(tools, + Tool{ + Owner: "openshift", + Repo: "oc", + Name: "oc", + Description: "Client to use an OpenShift 4.x cluster.", + URLTemplate: ` + {{$os := .OS}} + {{$arch := .Arch}} + {{$ext := "tar.gz"}} + {{$version := .VersionNumber}} + + {{- if eq .OS "darwin" -}} + {{$os = "mac"}} + {{- else if HasPrefix .OS "ming" -}} + {{$os = "windows"}} + {{$ext = "zip"}} + {{- end -}} + + {{- if eq .Arch "aarch64" -}} + {{$arch = "-arm64"}} + {{- else if eq .Arch "arm64" -}} + {{ $arch = "-arm64" }} + {{- else if eq .Arch "x86_64" -}} + {{ $arch = "" }} + {{- end -}} + + {{- if eq .VersionNumber "" -}} + {{$version = "latest"}} + {{- end -}} + + https://mirror.openshift.com/pub/openshift-v4/clients/ocp/{{$version}}/openshift-client-{{$os}}{{$arch}}.{{$ext}} + `, + }) + + tools = append(tools, + Tool{ + Owner: "ellie", + Repo: "atuin", + Name: "atuin", + Description: "Sync, search and backup shell history with Atuin.", + URLTemplate: ` + {{$os := .OS}} + {{$arch := .Arch}} + {{$ext := "tar.gz"}} + + {{- if eq .OS "darwin" -}} + {{$os = "apple-darwin"}} + {{- else if eq .OS "linux" -}} + {{$os = "unknown-linux-gnu"}} + {{- end -}} + + {{- if (or (eq .Arch "x86_64") (eq .Arch "amd64")) -}} + {{$arch = "x86_64"}} + {{- end -}} + + https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}-{{.Version}}-{{$arch}}-{{$os}}.{{$ext}}`, + }) + + tools = append(tools, + Tool{ + Owner: "project-copacetic", + Repo: "copacetic", + Name: "copa", + Description: "CLI for patching container images", + URLTemplate: ` + {{$arch := ""}} + {{ if (or (eq .Arch "x86_64") (eq .Arch "amd64")) -}} + {{$arch = "amd64"}} + {{- end -}} + + {{$osStr := ""}} + {{- if eq .OS "linux" -}} + {{$osStr = "linux"}} + {{- end -}} + + {{$extStr := "tar.gz"}} + + https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}_{{.VersionNumber}}_{{$osStr}}_{{$arch}}.{{$extStr}}`, + }) + return tools } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/arkade-0.9.17/pkg/helm/helm.go new/arkade-0.9.22/pkg/helm/helm.go --- old/arkade-0.9.17/pkg/helm/helm.go 2023-05-18 17:35:00.000000000 +0200 +++ new/arkade-0.9.22/pkg/helm/helm.go 2023-06-10 10:16:57.000000000 +0200 @@ -66,11 +66,12 @@ quiet bool ) + defaultMovePath := "" outPath, finalName, err := get.Download(tool, clientArch, clientOS, tool.Version, - get.DownloadArkadeDir, + defaultMovePath, progress, quiet) if err != nil { ++++++ arkade.obsinfo ++++++ --- /var/tmp/diff_new_pack.XURqYI/_old 2023-06-14 16:30:39.978957591 +0200 +++ /var/tmp/diff_new_pack.XURqYI/_new 2023-06-14 16:30:39.978957591 +0200 @@ -1,5 +1,5 @@ name: arkade -version: 0.9.17 -mtime: 1684424100 -commit: b8c2f3b8a5e95332ea226315809da70c2ab1e015 +version: 0.9.22 +mtime: 1686385017 +commit: ab3f8aa2a12aa2f3407e8150b5bdea97fd582a6e ++++++ vendor.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/otiai10/copy/README.md new/vendor/github.com/otiai10/copy/README.md --- old/vendor/github.com/otiai10/copy/README.md 2023-05-30 08:44:27.000000000 +0200 +++ new/vendor/github.com/otiai10/copy/README.md 2023-06-13 13:04:01.000000000 +0200 @@ -41,6 +41,9 @@ // OnDirExists can specify what to do when there is a directory already existing in destination. OnDirExists func(src, dest string) DirExistsAction + // OnError can let users decide how to handle errors (e.g., you can suppress specific error). + OnError func(src, dest, string, err error) error + // Skip can specify which files should be skipped Skip func(srcinfo os.FileInfo, src, dest string) (bool, error) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/otiai10/copy/copy.go new/vendor/github.com/otiai10/copy/copy.go --- old/vendor/github.com/otiai10/copy/copy.go 2023-05-30 08:44:27.000000000 +0200 +++ new/vendor/github.com/otiai10/copy/copy.go 2023-06-13 13:04:01.000000000 +0200 @@ -15,20 +15,20 @@ } // Copy copies src to dest, doesn't matter if src is a directory or a file. -func Copy(src, dest string, opt ...Options) error { +func Copy(src, dest string, opts ...Options) error { + opt := assureOptions(src, dest, opts...) info, err := os.Lstat(src) if err != nil { - return err + return onError(src, dest, err, opt) } - return switchboard(src, dest, info, assureOptions(src, dest, opt...)) + return switchboard(src, dest, info, opt) } // switchboard switches proper copy functions regarding file type, etc... // If there would be anything else here, add a case to this switchboard. func switchboard(src, dest string, info os.FileInfo, opt Options) (err error) { - if info.Mode()&os.ModeDevice != 0 && !opt.Specials { - return err + return onError(src, dest, err, opt) } switch { @@ -42,7 +42,7 @@ err = fcopy(src, dest, info, opt) } - return err + return onError(src, dest, err, opt) } // copyNextOrSkip decide if this src should be copied or not. @@ -132,7 +132,6 @@ // with scanning contents inside the directory // and pass everything to "copy" recursively. func dcopy(srcdir, destdir string, info os.FileInfo, opt Options) (err error) { - if skip, err := onDirExists(opt, srcdir, destdir); err != nil { return err } else if skip { @@ -243,3 +242,13 @@ *reported = err } } + +// onError lets caller to handle errors +// occured when copying a file. +func onError(src, dest string, err error, opt Options) error { + if opt.OnError == nil { + return err + } + + return opt.OnError(src, dest, err) +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/otiai10/copy/options.go new/vendor/github.com/otiai10/copy/options.go --- old/vendor/github.com/otiai10/copy/options.go 2023-05-30 08:44:27.000000000 +0200 +++ new/vendor/github.com/otiai10/copy/options.go 2023-06-13 13:04:01.000000000 +0200 @@ -14,6 +14,9 @@ // OnDirExists can specify what to do when there is a directory already existing in destination. OnDirExists func(src, dest string) DirExistsAction + // OnErr lets called decide whether or not to continue on particular copy error. + OnError func(src, dest string, err error) error + // Skip can specify which files should be skipped Skip func(srcinfo os.FileInfo, src, dest string) (bool, error) @@ -95,6 +98,7 @@ return Shallow // Do shallow copy }, OnDirExists: nil, // Default behavior is "Merge". + OnError: nil, // Default is "accept error" Skip: nil, // Do not skip anything AddPermission: 0, // Add nothing PermissionControl: PerservePermission, // Just preserve permission diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/modules.txt new/vendor/modules.txt --- old/vendor/modules.txt 2023-05-30 08:44:27.000000000 +0200 +++ new/vendor/modules.txt 2023-06-13 13:04:01.000000000 +0200 @@ -21,7 +21,7 @@ github.com/docker/cli/cli/config/configfile github.com/docker/cli/cli/config/credentials github.com/docker/cli/cli/config/types -# github.com/docker/distribution v2.8.1+incompatible +# github.com/docker/distribution v2.8.2+incompatible ## explicit github.com/docker/distribution/registry/client/auth/challenge # github.com/docker/docker v23.0.5+incompatible @@ -106,7 +106,7 @@ ## explicit; go 1.18 github.com/opencontainers/image-spec/specs-go github.com/opencontainers/image-spec/specs-go/v1 -# github.com/otiai10/copy v1.10.0 +# github.com/otiai10/copy v1.11.0 ## explicit; go 1.18 github.com/otiai10/copy # github.com/pkg/errors v0.9.1