Skip to content

Commit

Permalink
ci: fix shfmt install
Browse files Browse the repository at this point in the history
  • Loading branch information
mike325 committed Dec 4, 2023
1 parent 55ee70d commit 0b562ca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/autoformat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]

0 comments on commit 0b562ca

Please sign in to comment.