Add option to pass custom bundler version

This commit is contained in:
Andrejs Cunskis 2022-05-01 19:31:13 +03:00
parent 34bf5cf7ee
commit 1f15ec8684
No known key found for this signature in database
GPG key ID: 87CB75083F227241
5 changed files with 24 additions and 2 deletions

View file

@ -13,6 +13,8 @@ JEMALLOC_VERSION=5.2.1
JEMALLOC_DOWNLOAD_SHA256="34330e5ce276099e2e8950d9335db5a875689a4c6a56751ef3b1d8c537f887f6"
JEMALLOC_DOWNLOAD_URL="https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_VERSION}/jemalloc-${JEMALLOC_VERSION}.tar.bz2"
BUNDLER_VERSION=${3:-""}
# Install needed packages
apt-get update
apt-get install -y --no-install-recommends bison dpkg-dev libgdbm-dev autoconf
@ -60,6 +62,9 @@ export LDFLAGS="-Wl,--no-as-needed"
cflags="-fno-omit-frame-pointer" ./configure --enable-shared --with-jemalloc --disable-install-doc --disable-install-rdoc --disable-install-capi
make install -j $(nproc)
# Install specific version of bundler if provided
if [[ "$BUNDLER_VERSION" != "" ]]; then gem install bundler -v $BUNDLER_VERSION; fi
# Cleanup
cd /
rm -rf /usr/src/ruby /usr/src/jemalloc