Skip to content

Commit

Permalink
Merge pull request #537 from wasmx/shellcheck
Browse files Browse the repository at this point in the history
Run shellcheck
  • Loading branch information
axic authored Sep 24, 2020
2 parents 4dbe155 + 150ee36 commit e5025bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ jobs:
executor: linux-clang-latest
steps:
- checkout
- run:
name: "Run shellcheck"
command: |
git ls-files '*.sh' | xargs shellcheck
- run:
name: "Check code format"
command: |
Expand Down
8 changes: 4 additions & 4 deletions cmake/apply_patches.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env sh

patches_dir=$(dirname $0)
patches_dir=$(dirname "$0")

for patch_file in $patches_dir/*.patch; do
echo $(basename $patch_file)
for patch_file in "$patches_dir"/*.patch; do
echo "Applying patch: $(basename "$patch_file")"

# Use git-apply to patch files.
# The --git-dir forces the tool to work in "outside of git repo" mode.
git --git-dir=. apply -v $patch_file
git --git-dir=. apply -v "$patch_file"
exit_code=$?

# Exit code 1 is ignored as this happens when trying apply patches to already
Expand Down
4 changes: 2 additions & 2 deletions test/ci-benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ fi
branch=$(git rev-parse --abbrev-ref HEAD)

pipeline_id=$(
curl -s -u $CIRCLECI_TOKEN: -X POST https://circleci.com/api/v2/project/gh/wasmx/fizzy/pipeline \
curl -s -u "$CIRCLECI_TOKEN:" -X POST https://circleci.com/api/v2/project/gh/wasmx/fizzy/pipeline \
-H 'Content-Type: application/json' \
-d "{\"branch\":\"$branch\", \"parameters\":{\"benchmark\":true}}" |
jq -r '.id'
)

workflow_id=$(
curl -s -u $CIRCLECI_TOKEN: -X GET https://circleci.com/api/v2/pipeline/$pipeline_id/workflow |
curl -s -u "$CIRCLECI_TOKEN:" -X GET https://circleci.com/api/v2/pipeline/"$pipeline_id"/workflow |
jq -r '.items[0].id'
)

Expand Down

0 comments on commit e5025bc

Please sign in to comment.