rubygems: also download versions file

This commit is contained in:
Miao Wang 2024-04-04 15:58:37 +08:00
parent 332cb42cb0
commit 3bd346bbf6
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,6 @@
FROM ruby:2.7-alpine FROM ruby:2.7-alpine
RUN gem install rubygems-mirror RUN gem install rubygems-mirror
RUN apk add bash RUN apk add bash curl
# the command timeout provided by old verison of busybox was incompatible with that from coreutils and is compatible now. # the command timeout provided by old verison of busybox was incompatible with that from coreutils and is compatible now.
ENV BUSYBOX=0 ENV BUSYBOX=0
ENV HOME=/tmp ENV HOME=/tmp

View File

@ -40,4 +40,10 @@ if [[ $ret == 124 ]]; then
echo 'Sync timeout (/_\\)' echo 'Sync timeout (/_\\)'
fi fi
if [[ $ret == 0 ]]; then
curl -fsSL https://rubygems.org/versions > "$TUNASYNC_WORKING_DIR/.versions.new" && \
mv "$TUNASYNC_WORKING_DIR/.versions.new" "$TUNASYNC_WORKING_DIR/versions"
ret=$?
fi
exit $ret exit $ret