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
17
update.sh
17
update.sh
|
@ -42,20 +42,19 @@ for version in "${versions[@]}"; do
|
||||||
if \
|
if \
|
||||||
{
|
{
|
||||||
versionReleasePage="$(echo "$releasesPage" | grep "<td>Ruby $tryVersion</td>" -A 2 | awk -F '"' '$1 == "<td><a href=" { print $2; exit }')" \
|
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="$(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
|
; then
|
||||||
if \
|
fullVersion="$tryVersion"
|
||||||
shaVal="$(curl -fsSL "https://www.ruby-lang.org/$versionReleasePage" |tac|tac| grep "ruby-$tryVersion.tar.xz" -A 5 | awk '/^SHA256:/ { print $2; exit }')" \
|
break
|
||||||
&& [ "$shaVal" ] \
|
|
||||||
; then
|
|
||||||
fullVersion="$tryVersion"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue