From a78ec9da6ad68a74e6843015dc7c3374e9149d5e Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Wed, 13 Jan 2021 16:21:33 -0800 Subject: [PATCH] Simplify lowercase grep logic in docker script See gh-24811 --- ci/scripts/detect-docker-updates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/scripts/detect-docker-updates.sh b/ci/scripts/detect-docker-updates.sh index a702f73cf8..af8ee1982c 100755 --- a/ci/scripts/detect-docker-updates.sh +++ b/ci/scripts/detect-docker-updates.sh @@ -1,6 +1,6 @@ #!/bin/bash -latest_version=$(curl -I -s https://github.com/docker/docker-ce/releases/latest | awk '{print tolower($0)}' | grep "location:" | awk '{n=split($0, parts, "/"); print substr(parts[n],2);}' | awk '{$1=$1;print}' | tr -d '\r' | tr -d '\n' ) +latest_version=$(curl -I -s https://github.com/docker/docker-ce/releases/latest | grep -i "location:" | awk '{n=split($0, parts, "/"); print substr(parts[n],2);}' | awk '{$1=$1;print}' | tr -d '\r' | tr -d '\n' ) if [[ $latest_version =~ (beta|rc) ]]; then echo "Skip pre-release versions"