From dd09dd20eff89a953a6852f6c2f42d8b5cdb82c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Thu, 9 May 2024 13:41:25 +0200 Subject: [PATCH 1/3] install.sh: remove eval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's not needed Signed-off-by: Paweł Gronowski --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 0734c02d..dc7540c7 100755 --- a/install.sh +++ b/install.sh @@ -179,7 +179,7 @@ version_gte() { if [ -z "$VERSION" ]; then return 0 fi - eval version_compare "$VERSION" "$1" + version_compare "$VERSION" "$1" } # version_compare compares two version strings (either SemVer (Major.Minor.Path), From 21b3f00cd9cfd8d90b3b5d5bfa2078e0aa085bf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Thu, 9 May 2024 13:41:44 +0200 Subject: [PATCH 2/3] Makefile: Ignore SC2329 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In previous versions of shellcheck, SC2317 was emitted for every line of a unused function and we're ignoring the SC2317 completely: https://github.com/docker/docker-install/blob/6e61729e66af62fd54c0b659751a431be8f90f68/Makefile#L6 We were ignoring this error due to `version_compare` being reported as a false positive. After https://github.com/koalaman/shellcheck/commit/4f81dbe839091a06a5cfaea695cf1c451ff07565 this was fixed and now it produces one `SC2329` for the whole function instead of multiple SC2137. Signed-off-by: Paweł Gronowski --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1162c32f..9ce23f0d 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION?= CHANNEL?= VOLUME_MOUNTS=-v "$(CURDIR)":/v -SHELLCHECK_EXCLUSIONS=$(addprefix -e, SC1091 SC1117 SC2317) +SHELLCHECK_EXCLUSIONS=$(addprefix -e, SC1091 SC1117 SC2317 SC2329) SHELLCHECK=docker run --rm $(VOLUME_MOUNTS) -w /v koalaman/shellcheck:stable $(SHELLCHECK_EXCLUSIONS) ENVSUBST_VARS=LOAD_SCRIPT_COMMIT_SHA From c428d31be852971910b4529785f50b101c8f06ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Thu, 9 May 2024 14:38:31 +0200 Subject: [PATCH 3/3] Fix wrong example in `version_gte` comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index dc7540c7..29f98f12 100755 --- a/install.sh +++ b/install.sh @@ -174,7 +174,7 @@ command_exists() { # version_gte 23.0 // 0 (success) # version_gte 20.10 // 0 (success) # version_gte 19.03 // 0 (success) -# version_gte 21.10 // 1 (fail) +# version_gte 26.1 // 1 (fail) version_gte() { if [ -z "$VERSION" ]; then return 0