Skip to content

Commit

Permalink
rubygems: also download versions file
Browse files Browse the repository at this point in the history
  • Loading branch information
shankerwangmiao committed Apr 4, 2024
1 parent 332cb42 commit 3bd346b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dockerfiles/rubygems/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ruby:2.7-alpine
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.
ENV BUSYBOX=0
ENV HOME=/tmp
6 changes: 6 additions & 0 deletions rubygems.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,10 @@ if [[ $ret == 124 ]]; then
echo 'Sync timeout (/_\\)'
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

0 comments on commit 3bd346b

Please sign in to comment.