From d106fee4a5fb7fcf33afc308f3acda96ad649e38 Mon Sep 17 00:00:00 2001 From: Nivin Thomas Date: Tue, 24 Feb 2026 14:24:13 +0000 Subject: [PATCH 1/4] INFRA-39812: test asdf 0.16 --- .github/workflows/asdf.yml | 4 ++-- modules/asdf/Makefile | 26 ++++++++++++++++++++------ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/asdf.yml b/.github/workflows/asdf.yml index 1cd9a3167f..6cdac00642 100644 --- a/.github/workflows/asdf.yml +++ b/.github/workflows/asdf.yml @@ -9,8 +9,8 @@ jobs: run: cat modules/satoshi/tf-tool-versions modules/satoshi/k8s-tool-versions > .tool-versions shell: bash - name: setup - uses: asdf-vm/actions/setup@v2 + uses: asdf-vm/actions/setup@v4 - name: plugins setup run: grep -E "^#asdf:" '.tool-versions' | cut -d':' -f2- | tr '\n' '\0' | xargs -0 -n1 -Icmd -- sh -c 'asdf cmd' || true - name: install - uses: asdf-vm/actions/install@v2 + uses: asdf-vm/actions/install@v4 diff --git a/modules/asdf/Makefile b/modules/asdf/Makefile index 8320fe9f4b..7108137f32 100644 --- a/modules/asdf/Makefile +++ b/modules/asdf/Makefile @@ -1,14 +1,28 @@ ## asdf helpers -ASDF_ROOT := ${HOME}/.asdf +ASDF_VERSION := 0.16.7 +ASDF_BIN_DIR := ${HOME}/.local/bin ASDF_REPO_DIR=$(shell pwd) .PHONY: asdf/install ## Installing required tools asdf/install: - test -s $(ASDF_ROOT) || git clone https://github.com/asdf-vm/asdf.git $(ASDF_ROOT) && source $(ASDF_ROOT)/asdf.sh ;\ - grep -E "^#asdf:" '${ASDF_REPO_DIR}/.tool-versions' | cut -d':' -f2- | tr '\n' '\0' | xargs -0 -n1 -Icmd -- sh -c 'asdf cmd' || true;\ + @CURRENT_VER=$$(asdf version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' || echo "0.0.0"); \ + if [ "$$CURRENT_VER" != "$(ASDF_VERSION)" ]; then \ + echo "Upgrading asdf from $$CURRENT_VER to $(ASDF_VERSION)..."; \ + rm -f $(ASDF_BIN_DIR)/asdf; \ + rm -rf $${HOME}/.asdf; \ + mkdir -p $(ASDF_BIN_DIR); \ + curl -fsSL "https://github.com/asdf-vm/asdf/releases/download/v$(ASDF_VERSION)/asdf-v$(ASDF_VERSION)-linux-amd64.tar.gz" \ + | tar -xz -C $(ASDF_BIN_DIR); \ + chmod +x $(ASDF_BIN_DIR)/asdf; \ + echo "Ensure $(ASDF_BIN_DIR) is in your PATH"; \ + else \ + echo "asdf $(ASDF_VERSION) already installed"; \ + fi + @export PATH="$(ASDF_BIN_DIR):$$PATH"; \ + grep -E "^#asdf:" '${ASDF_REPO_DIR}/.tool-versions' | cut -d':' -f2- | tr '\n' '\0' | xargs -0 -n1 -Icmd -- sh -c 'asdf cmd' || true; \ asdf install - echo "Profile changes are required. Add the following to your .bashrc:" - echo -e "if [ -e $HOME/.asdf ]; then\n . $HOME/.asdf/asdf.sh\n . $HOME/.asdf/completions/asdf.bash\nfi" - echo "Or see https://asdf-vm.com/guide/getting-started.html#_3-install-asdf for details" + @echo "Ensure $(ASDF_BIN_DIR) is on your PATH. For example, add to your shell profile:" + @echo ' export PATH="$$HOME/.local/bin:$$PATH"' + @echo "Or see https://asdf-vm.com/guide/getting-started.html for details" From f62fdb382afee17bb2c7a3849e130dcf15e4961d Mon Sep 17 00:00:00 2001 From: Nivin Thomas Date: Tue, 24 Feb 2026 14:36:02 +0000 Subject: [PATCH 2/4] fix permission issue --- modules/asdf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/asdf/Makefile b/modules/asdf/Makefile index 7108137f32..b4b5bbd6d5 100644 --- a/modules/asdf/Makefile +++ b/modules/asdf/Makefile @@ -11,7 +11,7 @@ asdf/install: if [ "$$CURRENT_VER" != "$(ASDF_VERSION)" ]; then \ echo "Upgrading asdf from $$CURRENT_VER to $(ASDF_VERSION)..."; \ rm -f $(ASDF_BIN_DIR)/asdf; \ - rm -rf $${HOME}/.asdf; \ + chmod -R u+w $${HOME}/.asdf 2>/dev/null; rm -rf $${HOME}/.asdf; \ mkdir -p $(ASDF_BIN_DIR); \ curl -fsSL "https://github.com/asdf-vm/asdf/releases/download/v$(ASDF_VERSION)/asdf-v$(ASDF_VERSION)-linux-amd64.tar.gz" \ | tar -xz -C $(ASDF_BIN_DIR); \ From f2070fa80d592b35efd65104b22c8ca1e680e627 Mon Sep 17 00:00:00 2001 From: Nivin Thomas Date: Wed, 25 Feb 2026 11:36:11 +0000 Subject: [PATCH 3/4] Add ~/.asdf/shims to PATH --- modules/asdf/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/asdf/Makefile b/modules/asdf/Makefile index b4b5bbd6d5..a94cb288ce 100644 --- a/modules/asdf/Makefile +++ b/modules/asdf/Makefile @@ -23,6 +23,7 @@ asdf/install: @export PATH="$(ASDF_BIN_DIR):$$PATH"; \ grep -E "^#asdf:" '${ASDF_REPO_DIR}/.tool-versions' | cut -d':' -f2- | tr '\n' '\0' | xargs -0 -n1 -Icmd -- sh -c 'asdf cmd' || true; \ asdf install - @echo "Ensure $(ASDF_BIN_DIR) is on your PATH. For example, add to your shell profile:" - @echo ' export PATH="$$HOME/.local/bin:$$PATH"' + @echo "Ensure $(ASDF_BIN_DIR) and the asdf shims directory are on your PATH." + @echo "Add the following to your shell profile:" + @echo ' export PATH="$$HOME/.asdf/shims:$$HOME/.local/bin:$$PATH"' @echo "Or see https://asdf-vm.com/guide/getting-started.html for details" From a43daade5b20b17d7521f1e027fa6e48dddf1764 Mon Sep 17 00:00:00 2001 From: Nivin Thomas Date: Wed, 25 Feb 2026 11:52:56 +0000 Subject: [PATCH 4/4] Use asdf 0.18 which is the latest version --- modules/asdf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/asdf/Makefile b/modules/asdf/Makefile index a94cb288ce..cdd0aff630 100644 --- a/modules/asdf/Makefile +++ b/modules/asdf/Makefile @@ -1,5 +1,5 @@ ## asdf helpers -ASDF_VERSION := 0.16.7 +ASDF_VERSION := 0.18.0 ASDF_BIN_DIR := ${HOME}/.local/bin ASDF_REPO_DIR=$(shell pwd)