From b03da14904e8777c538f2651ccd5b82f472d1bae Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 28 Aug 2024 14:29:25 -0400 Subject: [PATCH] wip --- .github/scripts/version_updater.rb | 5 ++--- .github/workflows/update-gemfiles.yml | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/version_updater.rb b/.github/scripts/version_updater.rb index 56f0f51f119..550258eed1e 100644 --- a/.github/scripts/version_updater.rb +++ b/.github/scripts/version_updater.rb @@ -32,6 +32,7 @@ def update_gem(gem_to_update) definition = Bundler::Definition.build(gemfile, gemfile_lock, nil) dependencies = definition.dependencies + latest = Gem.latest_version_for(gem_to_update) dependencies.each do |dep| next if gem_to_update != dep.name # only update the gem we chose at random # puts "Skipping #{dep.name} as it is not #{gem_to_update}" @@ -45,9 +46,7 @@ def update_gem(gem_to_update) puts "Gem Version: #{gem_version}" puts "Gem Requirments: #{gem_requirements}" puts "Gem Platforms: #{gem_platforms}" - - latest = Gem.latest_version_for(gem_name) - + if gem_requirements.satisfied_by?(latest) puts "The latest (#{latest}) of #{gem_name} is satisfied by #{gem_requirements}" bundler_args = ['lock', '--update', gem_name] diff --git a/.github/workflows/update-gemfiles.yml b/.github/workflows/update-gemfiles.yml index 982d0d3d678..54f5e4cadf7 100644 --- a/.github/workflows/update-gemfiles.yml +++ b/.github/workflows/update-gemfiles.yml @@ -59,3 +59,4 @@ jobs: uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0 with: commit_message: Update gemfiles/* + branch: update-latest-version