mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
Fix support for Ruby versions
This commit is contained in:
parent
0b0a3b745a
commit
f0bf9d8f0c
4 changed files with 274 additions and 9 deletions
|
|
@ -8,11 +8,11 @@ RUBY_VERSION=${1}
|
|||
RUBY_MAJOR=${1%.*} # strip last component
|
||||
RUBY_DOWNLOAD_SHA256=${2}
|
||||
|
||||
RUBY_DOWNLOAD_URL="https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz"
|
||||
RUBY_DOWNLOAD_URL="https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz"
|
||||
|
||||
# Download Ruby
|
||||
curl -fsSL "$RUBY_DOWNLOAD_URL" -o ruby.tar.xz
|
||||
echo "${RUBY_DOWNLOAD_SHA256} ruby.tar.xz" | sha256sum -c -
|
||||
curl -fsSL "$RUBY_DOWNLOAD_URL" -o ruby.tar.gz
|
||||
echo "${RUBY_DOWNLOAD_SHA256} ruby.tar.gz" | sha256sum -c -
|
||||
|
||||
# Skip installing Gem docs
|
||||
mkdir -p /usr/local/etc
|
||||
|
|
@ -25,12 +25,12 @@ apt-get install -y --no-install-recommends bison dpkg-dev libgdbm-dev ruby
|
|||
|
||||
# Unpack Ruby
|
||||
mkdir -p /usr/src/ruby
|
||||
tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1
|
||||
tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1
|
||||
rm ruby.tar.xz
|
||||
cd /usr/src/ruby
|
||||
|
||||
# Apply patches
|
||||
find /patches/ruby/$RUBY_VERSION -name '*.patch' -print0 | xargs -0 -n1 patch -p1 -i
|
||||
find "/patches/ruby/$RUBY_VERSION" -name '*.patch' | xargs -rpn1 patch -p1 -i
|
||||
./configure --enable-shared --disable-install-doc --disable-install-rdoc --disable-install-capi
|
||||
make install -j $(nproc)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue