From f405fc4a1f5b4bddcb8e0654da7031694a906591 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 11 Jun 2024 14:35:41 +0100 Subject: [PATCH] actions/sync/shared-config: update Gemfile.lock if it exists. This avoids the need to manually update this file in every repository. --- .github/actions/sync/shared-config.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/actions/sync/shared-config.rb b/.github/actions/sync/shared-config.rb index 3ff3d864..43606328 100755 --- a/.github/actions/sync/shared-config.rb +++ b/.github/actions/sync/shared-config.rb @@ -173,6 +173,13 @@ def git(*args) end end +# Update Gemfile.lock if it exists, based on the Ruby version. +if (target_directory_path/"Gemfile.lock").exist? + Dir.chdir target_directory_path do + system "bundle", "install" + end +end + out, err, status = Open3.capture3("git", "-C", target_directory, "status", "--porcelain", "--ignore-submodules=dirty") raise err unless status.success?