Skip to content

Commit

Permalink
ci: add shellcheck to gha
Browse files Browse the repository at this point in the history
  • Loading branch information
benfdking committed Oct 4, 2024
1 parent 68713e1 commit a15cec9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ jobs:
run: cargo machete
- name: Cargo hack
run: cargo hack check --each-feature --exclude-features=codegen-docs

prettier-formatting:
name: Check Prettier formatting
runs-on: ubuntu-latest
Expand All @@ -143,3 +142,12 @@ jobs:
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run fmt:check
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
scandir: "./.hacking/scripts"
3 changes: 3 additions & 0 deletions .hacking/scripts/convert_release_to_draft.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/bash
set -eo pipefail

VERSION="v$(grep "^version" Cargo.toml | awk -F '"' '{print $2}')"
echo "VERSION: $VERSION"

Expand Down
3 changes: 3 additions & 0 deletions .hacking/scripts/convert_release_to_not_draft.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/bash
set -eo pipefail

VERSION="v$(grep "^version" Cargo.toml | awk -F '"' '{print $2}')"
echo "VERSION: $VERSION"

Expand Down
5 changes: 2 additions & 3 deletions .hacking/scripts/update_homebrew_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ sed -i "s/version \".*\"/version \"${STRIPPED_VERSION}\"/" sqruff.rb
# Get the urls and shas for the assets in the release

response=$(curl -s -H "Authorization: Bearer $HOMEBREW_ACCESS_TOKEN" -H "Accept: application/vnd.github.v3+json" "$API_URL")
echo $response
echo "$response"

assets=$(echo "$response" | jq -c '.assets[] | {name: .name, url: .url, sha256: .browser_download_url}')
echo $assets
echo "$assets"

while read -r asset; do
echo "Asset: $asset"
name=$(echo "$asset" | jq -r '.name')
url=$(echo "$asset" | jq -r '.url')
sha256=$(echo "$asset" | jq -r '.sha256')

if [[ "$name" == *"darwin-aarch64"* ]]; then
Expand Down

0 comments on commit a15cec9

Please sign in to comment.