From 0b562ca24dfab6f75956ec5de4c1ac754f15611a Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 4 Dec 2023 15:40:39 +0100 Subject: [PATCH] ci: fix shfmt install --- .github/workflows/autoformat.yml | 11 +++++------ .github/workflows/lint.yml | 10 +++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/autoformat.yml b/.github/workflows/autoformat.yml index 99176e5..9500dc9 100644 --- a/.github/workflows/autoformat.yml +++ b/.github/workflows/autoformat.yml @@ -30,20 +30,19 @@ jobs: # FIX: Temporally fix as currently the latest tag does not have a release rm -f ~/.local/bin/shfmt - bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) - source "$HOME/.gvm/scripts/gvm" - gvm install "$GO_VERSION" -B - gvm use "$GO_VERSION" --default + # bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) + # source "$HOME/.gvm/scripts/gvm" + # gvm install "$GO_VERSION" -B + # gvm use "$GO_VERSION" --default go install mvdan.cc/sh/v3/cmd/shfmt@latest echo "$HOME/.local/bin" >> $GITHUB_PATH - echo "$HOME/.gvm/pkgsets/$GO_VERSION/global/bin/" >> $GITHUB_PATH + echo "$HOME/go/bin/" >> $GITHUB_PATH - name: Stylua run: | stylua -s . - name: Shfmt run: | - source "$HOME/.gvm/scripts/gvm" shfmt -i 4 -s -ci -kp -w . shfmt -i 4 -s -ci -kp -w ./shell/zfunctions/* - uses: EndBug/add-and-commit@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 295838b..affb120 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,13 +40,13 @@ jobs: sudo luarocks install luacheck - bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) - source "$HOME/.gvm/scripts/gvm" - gvm install "$GO_VERSION" -B - gvm use "$GO_VERSION" --default + # bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) + # source "$HOME/.gvm/scripts/gvm" + # gvm install "$GO_VERSION" -B + # gvm use "$GO_VERSION" --default go install mvdan.cc/sh/v3/cmd/shfmt@latest echo "$HOME/.local/bin" >> $GITHUB_PATH - echo "$HOME/.gvm/pkgsets/$GO_VERSION/global/bin/" >> $GITHUB_PATH + echo "$HOME/go/bin/" >> $GITHUB_PATH - name: Linting source code uses: pre-commit/action@v2.0.3