From a23b88c74c66146d09090532b8bf5813fd6ef293 Mon Sep 17 00:00:00 2001 From: Tiago Ilieve Date: Sat, 2 Nov 2024 01:06:32 -0300 Subject: [PATCH] Add 'hugo' --- main.go | 2 ++ tools/asset.go | 4 ++++ tools/tables.go | 21 +++++++++++++++++++++ tools/tools.go | 3 +++ 4 files changed, 30 insertions(+) diff --git a/main.go b/main.go index 2f82c6c..66746e2 100644 --- a/main.go +++ b/main.go @@ -97,6 +97,7 @@ func main() { bottomCmd := newCommand(tools.Bottom, "Yet another cross-platform graphical process/system monitor") cloudflaredCmd := newCommand(tools.Cloudflared, "Argo Tunnel client") flyctlCmd := newCommand(tools.Flyctl, "Command line tools for fly.io services") + hugoCmd := newCommand(tools.Hugo, "The world's fastest framework for building websites") k9sCmd := newCommand(tools.K9s, "Kubernetes CLI To Manage Your Clusters In Style") kubectxCmd := newCommand(tools.Kubectx, "Faster way to switch between clusters in kubectl") ripgrepCmd := newCommand(tools.Ripgrep, "Recursively searches directories for a regex pattern") @@ -118,6 +119,7 @@ func main() { rootCmd.AddCommand(bottomCmd) rootCmd.AddCommand(cloudflaredCmd) rootCmd.AddCommand(flyctlCmd) + rootCmd.AddCommand(hugoCmd) rootCmd.AddCommand(k9sCmd) rootCmd.AddCommand(kubectxCmd) rootCmd.AddCommand(ripgrepCmd) diff --git a/tools/asset.go b/tools/asset.go index cf36eca..fdc03ca 100644 --- a/tools/asset.go +++ b/tools/asset.go @@ -29,6 +29,10 @@ func (t *Tool) AssetFlyctl() { t.Asset.Name = fmt.Sprintf("flyctl_%v_%v_%v.tar.gz", t.TrimVersion(), t.OS, t.Arch) } +func (t *Tool) AssetHugo() { + t.Asset.Name = fmt.Sprintf("hugo_%v_%v-%v.tar.gz", t.TrimVersion(), t.OS, t.Arch) +} + func (t *Tool) AssetK9s() { t.Asset.Name = fmt.Sprintf("k9s_%v_%v.tar.gz", t.OS, t.Arch) } diff --git a/tools/tables.go b/tools/tables.go index 39a432a..ca13781 100644 --- a/tools/tables.go +++ b/tools/tables.go @@ -39,6 +39,16 @@ var Arch = map[string]map[string]map[string]string{ "arm64": "arm64", }, }, + Hugo: { + "darwin": { + "amd64": "universal", + "arm64": "universal", + }, + "linux": { + "amd64": "amd64", + "arm64": "arm64", + }, + }, K9s: { "darwin": { "amd64": "amd64", @@ -156,6 +166,16 @@ var OS = map[string]map[string]map[string]string{ "arm64": "Linux", }, }, + Hugo: { + "darwin": { + "amd64": "darwin", + "arm64": "darwin", + }, + "linux": { + "amd64": "linux", + "arm64": "linux", + }, + }, K9s: { "darwin": { "amd64": "Darwin", @@ -239,6 +259,7 @@ var URL = map[string]string{ Bottom: "https://github.com/ClementTsang/bottom", Cloudflared: "https://github.com/cloudflare/cloudflared", Flyctl: "https://github.com/superfly/flyctl", + Hugo: "https://github.com/gohugoio/hugo", K9s: "https://github.com/derailed/k9s", Kubectx: "https://github.com/ahmetb/kubectx", Ripgrep: "https://github.com/BurntSushi/ripgrep", diff --git a/tools/tools.go b/tools/tools.go index 19cb8e5..6afcff8 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -16,6 +16,7 @@ const ( Bottom = "btm" Cloudflared = "cloudflared" Flyctl = "flyctl" + Hugo = "hugo" K9s = "k9s" Kubectx = "kubectx" Ripgrep = "rg" @@ -173,6 +174,8 @@ func (t *Tool) SetAsset() error { t.AssetCloudflared() case Flyctl: t.AssetFlyctl() + case Hugo: + t.AssetHugo() case K9s: t.AssetK9s() case Kubectx: