1
0
Fork 0
mirror of https://github.com/docker-library/ruby.git synced 2022-11-09 11:41:34 -05:00

Fix update.sh so it picks up 2.5.0-rc1

This accounts for https://github.com/ruby/www.ruby-lang.org/pull/1691#discussion_r157087824.
This commit is contained in:
Tianon Gravi 2017-12-14 19:56:14 -08:00
parent c7145524ca
commit 458fa7be72

View file

@ -42,20 +42,19 @@ for version in "${versions[@]}"; do
if \
{
versionReleasePage="$(echo "$releasesPage" | grep "<td>Ruby $tryVersion</td>" -A 2 | awk -F '"' '$1 == "<td><a href=" { print $2; exit }')" \
&& [ "$versionReleasePage" ]
&& [ "$versionReleasePage" ] \
&& shaVal="$(curl -fsSL "https://www.ruby-lang.org/$versionReleasePage" |tac|tac| grep "ruby-$tryVersion.tar.xz" -A 5 | awk '/^SHA256:/ { print $2; exit }')" \
&& [ "$shaVal" ]
} \
|| {
versionReleasePage="$(echo "$newsPage" | grep -oE '<a href="[^"]+">Ruby '"$tryVersion"' Released</a>' | cut -d'"' -f2)" \
&& [ "$versionReleasePage" ]
&& [ "$versionReleasePage" ] \
&& shaVal="$(curl -fsSL "https://www.ruby-lang.org/$versionReleasePage" |tac|tac| grep "ruby-$tryVersion.tar.xz" -A 5 | awk '/^SHA256:/ { print $2; exit }')" \
&& [ "$shaVal" ]
} \
; then
if \
shaVal="$(curl -fsSL "https://www.ruby-lang.org/$versionReleasePage" |tac|tac| grep "ruby-$tryVersion.tar.xz" -A 5 | awk '/^SHA256:/ { print $2; exit }')" \
&& [ "$shaVal" ] \
; then
fullVersion="$tryVersion"
break
fi
fullVersion="$tryVersion"
break
fi
done