diff --git a/BUNDLER_VERSION.txt b/BUNDLER_VERSION.txt new file mode 100644 index 0000000..bbf649f --- /dev/null +++ b/BUNDLER_VERSION.txt @@ -0,0 +1 @@ +1.7.3 \ No newline at end of file diff --git a/linux/build b/linux/build index 33f4839..3738189 100755 --- a/linux/build +++ b/linux/build @@ -118,6 +118,7 @@ exec docker run \ -e "APP_UID=`id -u`" \ -e "APP_GID=`id -g`" \ -e "RUBY_VERSION=`cat \"$SELFDIR/../RUBY_VERSION.txt\"`" \ + -e "BUNDLER_VERSION=`cat \"$SELFDIR/../BUNDLER_VERSION.txt\"`" \ -e "ARCHITECTURE=$ARCHITECTURE" \ -e "CONCURRENCY=$CONCURRENCY" \ -e "SETUP_SOURCE=$SETUP_SOURCE" \ diff --git a/linux/internal/build b/linux/internal/build index bc91f61..0abdfb2 100755 --- a/linux/internal/build +++ b/linux/internal/build @@ -24,6 +24,7 @@ echo $ARCHITECTURE > $ROOT/system/NAME echo $APP_UID > $ROOT/system/APP_UID echo $APP_GID > $ROOT/system/APP_GID echo $RUBY_VERSION > $ROOT/system/RUBY_VERSION +echo $BUNDLER_VERSION > $ROOT/system/BUNDLER_VERSION echo $CONCURRENCY > $ROOT/system/CONCURRENCY echo $SETUP_SOURCE > $ROOT/system/SETUP_SOURCE echo $COMPILE > $ROOT/system/COMPILE diff --git a/linux/internal/build-inside-mock b/linux/internal/build-inside-mock index e548296..219487f 100755 --- a/linux/internal/build-inside-mock +++ b/linux/internal/build-inside-mock @@ -7,6 +7,7 @@ NAME=`cat /system/NAME` APP_UID=`cat /system/APP_UID` APP_GID=`cat /system/APP_GID` RUBY_VERSION=`cat /system/RUBY_VERSION` +BUNDLER_VERSION=`cat /system/BUNDLER_VERSION` CONCURRENCY=`cat /system/CONCURRENCY` SETUP_SOURCE=`cat /system/SETUP_SOURCE` COMPILE=`cat /system/COMPILE` @@ -171,7 +172,7 @@ echo $GEM_EXTENSION_API_VERSION > /tmp/ruby/info/GEM_EXTENSION_API_VERSION run rm -rf /tmp/ruby/lib/ruby/gems/$RUBY_COMPAT_VERSION/gems/{test-unit,rdoc}-* if [[ -e /system/Gemfile ]]; then - run /tmp/ruby/bin/gem install bundler --no-rdoc --no-ri + run /tmp/ruby/bin/gem install bundler -v $BUNDLER_VERSION --no-rdoc --no-ri run cp /system/Gemfile* /tmp/ruby echo "+ Entering /tmp/ruby" pushd /tmp/ruby >/dev/null diff --git a/osx/build b/osx/build index f17c69f..1141388 100755 --- a/osx/build +++ b/osx/build @@ -5,6 +5,7 @@ SELFDIR=`dirname "$0"` SELFDIR=`cd "$SELFDIR" && pwd` source "$SELFDIR/internal/reset_environment.sh" source "$SELFDIR/../shared/library.sh" +BUNDLER_VERSION=`cat "$SELFDIR/../BUNDLER_VERSION.txt"` WORKDIR= OWNS_WORKDIR=true @@ -263,10 +264,10 @@ if [[ "$GEMFILE" != "" ]]; then fi # Install Bundler, either from cache or directly. - if [[ -e "$RUNTIME_DIR/vendor/cache/bundler-1.7.3.gem" ]]; then - run /tmp/ruby/bin/gem install "$RUNTIME_DIR/vendor/cache/bundler-1.7.3.gem" --no-rdoc --no-ri + if [[ -e "$RUNTIME_DIR/vendor/cache/bundler-$BUNDLER_VERSION.gem" ]]; then + run /tmp/ruby/bin/gem install "$RUNTIME_DIR/vendor/cache/bundler-$BUNDLER_VERSION.gem" --no-rdoc --no-ri else - run /tmp/ruby/bin/gem install bundler -v 1.7.3 --no-rdoc --no-ri + run /tmp/ruby/bin/gem install bundler -v $BUNDLER_VERSION --no-rdoc --no-ri fi # Run bundle install. @@ -281,7 +282,7 @@ if [[ "$GEMFILE" != "" ]]; then run /tmp/ruby/bin/bundle package run rm -rf "$RUNTIME_DIR/vendor" run mv vendor "$RUNTIME_DIR/" - run cp /tmp/ruby/lib/ruby/gems/$RUBY_COMPAT_VERSION/cache/bundler-1.7.3.gem "$RUNTIME_DIR/vendor/cache/" + run cp /tmp/ruby/lib/ruby/gems/$RUBY_COMPAT_VERSION/cache/bundler-$BUNDLER_VERSION.gem "$RUNTIME_DIR/vendor/cache/" run rm -rf Gemfile* .bundle echo "+ Leaving /tmp/ruby" popd >/dev/null diff --git a/shared/package b/shared/package index c0e0bf9..82e7097 100755 --- a/shared/package +++ b/shared/package @@ -4,6 +4,7 @@ set -e SELFDIR=`dirname "$0"` SELFDIR=`cd "$SELFDIR" && pwd` source "$SELFDIR/library.sh" +BUNDLER_VERSION=`cat "$SELFDIR/../BUNDLER_VERSION.txt"` BUILD_OUTPUT_DIR= RUBY_PACKAGE= @@ -108,7 +109,9 @@ if [[ "$RUBY_PACKAGE" != "" ]]; then --exclude "lib/ruby/gems/$RUBY_COMPAT_VERSION/specifications/" \ . run tar -rf "$RUBY_PACKAGE.tmp" -C "$BUILD_OUTPUT_DIR" \ - "./lib/ruby/gems/$RUBY_COMPAT_VERSION/specifications/default/" + "./lib/ruby/gems/$RUBY_COMPAT_VERSION/gems/bundler-$BUNDLER_VERSION" \ + "./lib/ruby/gems/$RUBY_COMPAT_VERSION/specifications/bundler-$BUNDLER_VERSION.gemspec" \ + "./lib/ruby/gems/$RUBY_COMPAT_VERSION/specifications/default" echo "+ gzip --best --no-name -c $RUBY_PACKAGE.tmp > $RUBY_PACKAGE" gzip --best --no-name -c "$RUBY_PACKAGE.tmp" > "$RUBY_PACKAGE" run rm "$RUBY_PACKAGE.tmp"