Skip to content

Commit 9e27c78

Browse files
committed
chore: Fix all shellcheck warnings for files in scripts/
1 parent a4c8350 commit 9e27c78

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ install-docker-plugin:
55
.PHONY: shellcheck
66
shellcheck:
77
find . -path "./tmp" -prune -o -type f \( -name "docker-pussh" -o -name "*.sh" \) -print0 \
8-
| xargs -0 shellcheck -s bash --enable=check-extra-masked-returns,check-set-e-suppressed,quote-safe-variables ;
8+
| xargs -0 shellcheck --enable=check-extra-masked-returns,check-set-e-suppressed,quote-safe-variables ;

scripts/dind-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cleanup() {
77

88
# Terminate the main process if it has been started.
99
if [ -n "${MAIN_PID:-}" ]; then
10-
kill "$MAIN_PID" 2>/dev/null || true
10+
kill "${MAIN_PID}" 2>/dev/null || true
1111
fi
1212

1313
# Terminate Docker daemon if PID file exists.

scripts/release-version.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
55
cd "${SCRIPT_DIR}/.."
66

77
# Ensure a new version argument is provided
8-
if [ "$#" -lt 1 ]; then
8+
if [[ "$#" -lt 1 ]]; then
99
echo "Usage: ${0} <new-version> [--execute]"
1010
exit 1
1111
fi
@@ -19,14 +19,14 @@ if ! git diff-index --quiet HEAD --; then
1919
fi
2020

2121
# Check if the --execute flag is passed
22-
if [ "${2:-}" == "--execute" ]; then
22+
if [[ "${2:-}" == "--execute" ]]; then
2323
EXECUTE=1
2424
else
2525
echo "Dry-run mode: No changes will be committed or tagged. Use '--execute' to apply changes."
2626
fi
2727

2828
# Validate semantic version format
29-
if ! [[ "$NEW_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
29+
if ! [[ "${NEW_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
3030
echo "Error: Version must be in semantic format (e.g., 1.2.3)"
3131
exit 1
3232
fi
@@ -44,14 +44,14 @@ echo -e "Changes pending:\n---"
4444
git diff
4545
echo "---"
4646

47-
TAG_NAME="v$NEW_VERSION"
47+
TAG_NAME="v${NEW_VERSION}"
4848
COMMIT_MESSAGE="release: Bump version to ${NEW_VERSION}"
4949

5050
echo "Building the project with goreleaser..."
5151
goreleaser build --clean --snapshot
5252
echo "Project built successfully."
5353

54-
if [ "$EXECUTE" = "1" ]; then
54+
if [[ "${EXECUTE}" = "1" ]]; then
5555
echo "Executing changes..."
5656
git add -u
5757
git commit -m "${COMMIT_MESSAGE}"

0 commit comments

Comments
 (0)