From a8953a7bb89b94e1c4d60766fe2ee31ff37763e3 Mon Sep 17 00:00:00 2001 From: mkruskal-google Date: Wed, 20 Jul 2022 11:56:37 -0700 Subject: [PATCH] Fix permissions in Ruby release test --- kokoro/release/ruby/macos/build_artifacts.sh | 4 ++-- kokoro/release/ruby/macos/ruby/ruby_build.sh | 1 - kokoro/release/ruby/macos/ruby/ruby_build_environment.sh | 3 +++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/kokoro/release/ruby/macos/build_artifacts.sh b/kokoro/release/ruby/macos/build_artifacts.sh index c68b63cc43d7d..5a97a329a128c 100755 --- a/kokoro/release/ruby/macos/build_artifacts.sh +++ b/kokoro/release/ruby/macos/build_artifacts.sh @@ -12,8 +12,8 @@ export ARTIFACT_DIR=$(pwd)/artifacts # ruby environment bash kokoro/release/ruby/macos/ruby/ruby_build_environment.sh -gem install rubygems-update -update_rubygems +gem update --system +gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)" # build artifacts bash kokoro/release/ruby/macos/ruby/ruby_build.sh diff --git a/kokoro/release/ruby/macos/ruby/ruby_build.sh b/kokoro/release/ruby/macos/ruby/ruby_build.sh index 55773b21a9e5e..bbfc631197e8a 100755 --- a/kokoro/release/ruby/macos/ruby/ruby_build.sh +++ b/kokoro/release/ruby/macos/ruby/ruby_build.sh @@ -3,7 +3,6 @@ set -ex # Build protoc -use_bazel.sh 5.1.1 bazel build //:protoc export PROTOC=$PWD/bazel-bin/protoc diff --git a/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh b/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh index 49f279be40de5..ae973fce43506 100755 --- a/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh +++ b/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh @@ -4,7 +4,10 @@ set -ex set +ex # rvm script is very verbose and exits with errorcode +# Fix permissions sudo chown -R $(whoami) $HOME/.rvm/ +sudo chown -R $(whoami) /Library/Ruby/ + source $HOME/.rvm/scripts/rvm set -e # rvm commands are very verbose time rvm install 2.5.0