Skip to content

Commit 7be9a7e

Browse files
committed
add shellcheck to CI, resolve warnings
1 parent 5077e82 commit 7be9a7e

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/ci.yml

+8
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,11 @@ jobs:
107107
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
108108
with:
109109
files: lcov.info
110+
# Lint shell scripts
111+
shellcheck:
112+
runs-on: ubuntu-latest
113+
steps:
114+
- name: Checkout
115+
uses: actions/checkout@v3
116+
- name: Run shellcheck
117+
uses: ludeeus/[email protected]

scripts/publish-release.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,27 @@ release_tag="${GITHUB_REF:10}"
3333

3434
# prepare artifacts
3535
pushd output
36-
mv $release_input $release_target
37-
shasum -a 256 $release_target > $release_target_hash
36+
mv $release_input "$release_target"
37+
shasum -a 256 "$release_target" > "$release_target_hash"
3838
popd
3939

4040
# prepare release
4141
ORG="filecoin-project"
4242
REPO="builtin-actors"
4343

4444
# see if the release already exists by tag
45-
__release_response=`
45+
__release_response=$(
4646
curl \
4747
--header "Authorization: token $GITHUB_TOKEN" \
4848
"https://api.github.com/repos/$ORG/$REPO/releases/tags/$release_tag"
49-
`
50-
__release_id=`echo $__release_response | jq '.id'`
49+
)
50+
__release_id=$(echo "$__release_response" | jq '.id')
5151
if [ "$__release_id" = "null" ]; then
5252
echo "release $release_tag does not exist"
5353
exit 1
5454
fi
5555

56-
__release_upload_url=`echo $__release_response | jq -r '.upload_url' | cut -d'{' -f1`
56+
__release_upload_url=$(echo "$__release_response" | jq -r '.upload_url' | cut -d'{' -f1)
5757

5858
echo "uploading $release_target"
5959
curl \

0 commit comments

Comments
 (0)