From 77f89c0f4826d9292815cb9124e49177fc5a25ca Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Tue, 16 Jul 2024 23:01:38 +0300 Subject: [PATCH] feat(asdf): manage go packages with asdf --- config/asdf/golang-packages | 21 +++++++++++++++++++++ config/asdf/tool-versions | 1 + config/exports-apps | 2 ++ local/bin/dfm | 2 +- scripts/install-asdf.sh | 7 ++++--- 5 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 config/asdf/golang-packages diff --git a/config/asdf/golang-packages b/config/asdf/golang-packages new file mode 100644 index 0000000..3de07e7 --- /dev/null +++ b/config/asdf/golang-packages @@ -0,0 +1,21 @@ +// These are golang packages I use, +// so they should be available with all versions + +// sysadmin/scripting utilities, distributed as a single binary +github.com/skx/sysbox@release-0.18.0 +// Git Profile allows you to switch between user profiles in git repos +github.com/dotzero/git-profile@v1.4.0 +// An extensible command line tool or library to format yaml files. +github.com/google/yamlfmt/cmd/yamlfmt@v0.13.0 +// Parsing HTML at the command line +github.com/ericchiang/pup@v0.4.0 +// HTML to Markdown converter +github.com/suntong/html2md@v1.5.0 +// cheat allows you to create and view interactive cheatsheets on the cli. +github.com/cheat/cheat/cmd/cheat@4.4.2 +// Render markdown on the CLI, with pizzazz! 💅 +github.com/charmbracelet/glow@v1.5.1 +// Static checker for GitHub Actions workflow files +github.com/rhysd/actionlint/cmd/actionlint@v1.7.1 +// Cleans up your $HOME from those pesky dotfiles +github.com/doron-cohen/antidot@v0.6.3 diff --git a/config/asdf/tool-versions b/config/asdf/tool-versions index 9078790..76134cf 100644 --- a/config/asdf/tool-versions +++ b/config/asdf/tool-versions @@ -7,6 +7,7 @@ editorconfig-checker 2.8.0 eza 0.18.21 fd 10.1.0 github-cli 2.52.0 +golang 1.22.5 hadolint 2.12.0 kubectl 1.30.2 lazygit 0.43.1 diff --git a/config/exports-apps b/config/exports-apps index f7e61ae..1f6688b 100755 --- a/config/exports-apps +++ b/config/exports-apps @@ -32,6 +32,8 @@ export ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME="${XDG_CONFIG_HOME}/asdf/plu export ASDF_LOG_FILE="${XDG_CACHE_HOME}/asdf/asdf.log" export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY="latest_available" export ASDF_NPM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/npm-packages" +export ASDF_GOLANG_MOD_VERSION_ENABLED=true +export ASDF_GOLANG_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/golang-packages" export PATH="${ASDF_DIR}/bin:${PATH}" # bob manages nvim versions diff --git a/local/bin/dfm b/local/bin/dfm index 3365b1a..5f8bb3d 100755 --- a/local/bin/dfm +++ b/local/bin/dfm @@ -70,7 +70,7 @@ function section_install # $0 install dotenv $0 install fzf # $0 install gh - $0 install go + # $0 install go $0 install cheat-databases $0 install imagick # $0 install neofetch diff --git a/scripts/install-asdf.sh b/scripts/install-asdf.sh index c5f650c..519974a 100755 --- a/scripts/install-asdf.sh +++ b/scripts/install-asdf.sh @@ -23,7 +23,6 @@ asdf-plugin-manager add-all asdf install ASDF_INSTALLABLES=( - "nodejs:github.com/asdf-vm/asdf-nodejs.git" "1password-cli:github.com/NeoHsu/asdf-1password-cli.git" "age:github.com/threkk/asdf-age.git" "bottom:github.com/carbonteq/asdf-btm.git" @@ -32,20 +31,22 @@ ASDF_INSTALLABLES=( "eza:github.com/lwiechec/asdf-eza.git" "fd:gitlab.com/wt0f/asdf-fd.git" "github-cli:github.com/bartlomiejdanek/asdf-github-cli.git" + "golang:github.com/asdf-community/asdf-golang.git" "hadolint:github.com/devlincashman/asdf-hadolint.git" "kubectl:github.com/asdf-community/asdf-kubectl.git" "lazygit:github.com/nklmilojevic/asdf-lazygit.git" + "nodejs:github.com/asdf-vm/asdf-nodejs.git" "pipx:github.com/yozachar/asdf-pipx.git" "pre-commit:github.com/jonathanmorley/asdf-pre-commit.git" "ripgrep:gitlab.com/wt0f/asdf-ripgrep.git" "semgrep:github.com/brentjanderson/asdf-semgrep.git" - "terraform-ls:github.com/asdf-community/asdf-hashicorp.git" - "vault:github.com/asdf-community/asdf-hashicorp.git" "shellcheck:github.com/luizm/asdf-shellcheck.git" "shfmt:github.com/luizm/asdf-shfmt.git" + "terraform-ls:github.com/asdf-community/asdf-hashicorp.git" "terraform-lsp:github.com/bartlomiejdanek/asdf-terraform-lsp.git" "terragrunt:github.com/ohmer/asdf-terragrunt.git" "tf-summarize:github.com/adamcrews/asdf-tf-summarize.git" + "vault:github.com/asdf-community/asdf-hashicorp.git" "yamllint:github.com/ericcornelissen/asdf-yamllint.git" "yq:github.com/sudermanjr/asdf-yq.git" )