Skip to content

Commit

Permalink
Fix issues in cabal-gild check
Browse files Browse the repository at this point in the history
  • Loading branch information
palas committed Aug 2, 2024
1 parent 49c29fc commit d795ef3
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/check-cabal-gild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ jobs:
runs-on: ubuntu-latest

env:
CARDANO_GUILD_VERSION: "1.3.1.2"
CABAL_GILD_VERSION: "1.3.1.2"

steps:
- name: Download cardano-gild
- name: Download cabal-gild
run: |
cardano_gild_path="$(mktemp -d)"
version="${{env.CARDANO_GUILD_VERSION}}"
cabal_gild_path="$(mktemp -d)"
version="${{env.CABAL_GILD_VERSION}}"
curl -sL \
"https://github.com/tfausak/cabal-gild/releases/download/$version/cabal-gild-$version-linux-x64.tar.gz" \
| tar -C "$cardano_gild_path" -xz
| tar -C "$cabal_gild_path" -xz
echo "PATH=$cardano_gild_path:$PATH" >> "$GITHUB_ENV"
echo "PATH=$cabal_gild_path:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4

- name: Run cardano-gild over all modified files
- name: Run cabal-gild over all modified files
run: |
rc="0"
Expand All @@ -33,8 +33,13 @@ jobs:
echo "cabal-gild --mode=check --input=$file"
if ! cabal-gild --mode=check --input="$file"
then
cabal-gild --mode=format --io="$file"
echo "💣 $file is badly formatted. Fix it with:"
echo "cabal-gild --mode=format --io=$file"
echo -e
echo "Diff for $file:"
git diff "$file"
echo -e
rc="1"
fi
done
Expand Down

0 comments on commit d795ef3

Please sign in to comment.