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:
parent
c7145524ca
commit
458fa7be72
1 changed files with 8 additions and 9 deletions
13
update.sh
13
update.sh
|
@ -42,21 +42,20 @@ 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
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$fullVersion" ]; then
|
||||
|
|
Loading…
Reference in a new issue