Skip to content

Commit

Permalink
Add 'hugo'
Browse files Browse the repository at this point in the history
  • Loading branch information
myhro committed Nov 2, 2024
1 parent 2ac7235 commit a23b88c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions tools/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
21 changes: 21 additions & 0 deletions tools/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const (
Bottom = "btm"
Cloudflared = "cloudflared"
Flyctl = "flyctl"
Hugo = "hugo"
K9s = "k9s"
Kubectx = "kubectx"
Ripgrep = "rg"
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit a23b88c

Please sign in to comment.