Skip to content

Commit

Permalink
Fix Renovate PRs
Browse files Browse the repository at this point in the history
Renovate PRs fail because they try to copy the Gemfile.lock.release when
it doesn't exist, so we can ignore those branches.
  • Loading branch information
Fryguy committed Apr 26, 2024
1 parent f0db4fb commit 2c936be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/before_install
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if [ -n "$CI" ]; then
echo

# Gemfile.lock.release only applies to non-master branches and PRs to non-master branches
if [[ "$GITHUB_REPOSITORY_OWNER" = "ManageIQ" && "$GITHUB_BASE_REF" != "master" && "$GITHUB_REF_NAME" != "master" && "$GITHUB_REF_NAME" != "dependabot/"* ]]; then
if [[ "$GITHUB_REPOSITORY_OWNER" = "ManageIQ" && "$GITHUB_BASE_REF" != "master" && "$GITHUB_REF_NAME" != "master" && "$GITHUB_REF_NAME" != "dependabot/"* && "$GITHUB_REF_NAME" != "renovate/"* ]]; then
echo "== Setup Gemfile.lock.release =="
cp -f "$APP_ROOT/Gemfile.lock.release" "$APP_ROOT/Gemfile.lock"
echo
Expand Down
3 changes: 2 additions & 1 deletion lib/manageiq/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def self.setup_gemfile_lock
return unless ENV["GITHUB_REPOSITORY_OWNER"] == "ManageIQ" &&
ENV["GITHUB_BASE_REF"] != "master" && # PR to non-master branch
ENV["GITHUB_REF_NAME"] != "master" && # A non-master branch
!ENV["GITHUB_REF_NAME"].to_s.start_with?("dependabot/") # Dependabot makes branches in the core repo
!ENV["GITHUB_REF_NAME"].to_s.start_with?("dependabot/") && # Dependabot makes branches in the core repo
!ENV["GITHUB_REF_NAME"].to_s.start_with?("renovate/") # Renovate makes branches in the core repo

raise "Missing Gemfile.lock.release" unless APP_ROOT.join("Gemfile.lock.release").file?

Expand Down

0 comments on commit 2c936be

Please sign in to comment.