Fix Docker update detection on CI

See gh-26086
This commit is contained in:
dreis2211 2021-04-13 21:55:09 +02:00 committed by Phillip Webb
parent f29c707e6c
commit 505e6a1b4c

View File

@ -1,6 +1,6 @@
#!/bin/bash
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' )
latest_version=$(curl -I -s https://github.com/moby/moby/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"