Skip to content

Commit 8d38706

Browse files
committed
fix shellcheck issues
1 parent 883e9ed commit 8d38706

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/release-go-module.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,16 @@ jobs:
8080
id: check_breaking_changes
8181
run: |
8282
set +e # Disable exit on error to capture output even if the command fails
83+
# shellcheck disable=SC2296
8384
echo "Last tag version: ${{ env.LAST_TAG_VERSION }}"
8485
echo "Current tag version: ${VERSION}"
86+
# shellcheck disable=SC2086
87+
# shellcheck disable=SC1083
88+
# shellcheck disable=SC2296
8589
BREAKING_CHANGES=$(gorelease -base=${{ env.LAST_TAG_VERSION }} -version=${VERSION} 2>&1)
8690
echo "Breaking changes: ${BREAKING_CHANGES}"
8791
set -e # Re-enable exit on error for the subsequent steps
92+
# shellcheck disable=SC2129
8893
echo "BREAKING_CHANGES<<EOF" >> "$GITHUB_ENV"
8994
echo "$BREAKING_CHANGES" >> "$GITHUB_ENV"
9095
echo "EOF" >> "$GITHUB_ENV"
@@ -93,19 +98,22 @@ jobs:
9398
working-directory: ${{ env.PACKAGE_NAME }}
9499
id: read_additional_notes
95100
run: |
101+
96102
# Check if the .changeset directory exists and the file for the current version is present
97103
if [ -f ".changeset/${{ env.VERSION }}.md" ]; then
98104
# Read the content of the file
99105
RELEASE_NOTES=$(cat ".changeset/${{ env.VERSION }}.md")
100-
106+
101107
# Format the release notes and breaking changes into FULL_RELEASE_NOTES
108+
# shellcheck disable=SC2129
102109
echo "FULL_RELEASE_NOTES<<EOF" >> "$GITHUB_ENV"
103110
echo "## Release notes:" >> "$GITHUB_ENV"
104111
echo "$RELEASE_NOTES" >> "$GITHUB_ENV"
105112
echo "" >> "$GITHUB_ENV"
106113
echo "## Commits:" >> "$GITHUB_ENV"
107114
echo "${{ env.COMMITS }}" >> "$GITHUB_ENV"
108-
echo "" >> $GITHUB_ENV
115+
echo "" >> "$GITHUB_ENV"
116+
# shellcheck disable=SC2129
109117
echo "## Breaking changes:" >> "$GITHUB_ENV"
110118
echo "${{ env.BREAKING_CHANGES }}" >> "$GITHUB_ENV"
111119
echo "EOF" >> "$GITHUB_ENV"
@@ -114,7 +122,6 @@ jobs:
114122
echo "Error: Release notes file '.changeset/${{ env.VERSION }}.md' not found."
115123
exit 1
116124
fi
117-
118125
- name: Create GitHub Release
119126
env:
120127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -131,9 +138,9 @@ jobs:
131138
- name: Set binary name based on PACKAGE_NAME
132139
run: |
133140
if [ "${{ env.PACKAGE_NAME }}" == "framework" ]; then
134-
echo "BINARY_NAME=ctf" >> $GITHUB_ENV
141+
echo "BINARY_NAME=ctf" >> "$GITHUB_ENV"
135142
else
136-
echo "BINARY_NAME=${{ env.PACKAGE_NAME }}" >> $GITHUB_ENV
143+
echo "BINARY_NAME=${{ env.PACKAGE_NAME }}" >> "$GITHUB_ENV"
137144
fi
138145
- name: Build binary release
139146
uses: wangyoucao577/go-release-action@v1

0 commit comments

Comments
 (0)