Skip to content

Commit a78ec9d

Browse files
committed
Simplify lowercase grep logic in docker script
See gh-24811
1 parent aefeb3f commit a78ec9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ci/scripts/detect-docker-updates.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
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' )
3+
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' )
44

55
if [[ $latest_version =~ (beta|rc) ]]; then
66
echo "Skip pre-release versions"

0 commit comments

Comments
 (0)