Skip to content

Commit 59157a2

Browse files
committed
Update "dindLatest" calculation to be more defensive
1 parent d227bf4 commit 59157a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

versions.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ fi
2424
versions=( "${versions[@]%/}" )
2525

2626
# "tac|tac" for http://stackoverflow.com/a/28879552/433558
27-
dindLatest="$(curl -fsSL 'https://github.com/docker/docker/commits/master/hack/dind.atom' | tac|tac | awk -F '[[:space:]]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')"
27+
dindLatest="$(curl -fsSL 'https://github.com/docker/docker/commits/master/hack/dind.atom' | grep -E 'id.*Commit')"
28+
dindLatest="$(awk <<<"$dindLatest" -F '[[:space:]]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')"
2829

2930
dockerVersions="$(
3031
git ls-remote --tags https://github.com/docker/docker.git \

0 commit comments

Comments
 (0)