Skip to content

Commit

Permalink
Merge pull request #23334 from kbrock/rake_release
Browse files Browse the repository at this point in the history
Explicitly state bundler_d files
  • Loading branch information
Fryguy authored Feb 11, 2025
2 parents 290f142 + 0683022 commit e7ae628
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/tasks/release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ namespace :release do
puts
end

# usage:
# RELEASE_BRANCH=morphy UPDATE_GEMS="json" be rake release:generate_lockfile
desc "Generate the Gemfile.lock.release file"
task :generate_lockfile do
branch = ENV["RELEASE_BRANCH"]
Expand All @@ -191,9 +193,11 @@ namespace :release do
# Ensure that local and global bundler.d is not enabled
local_bundler_d = root.join("bundler.d")
global_bundler_d = Pathname.new(Dir.home).join(".bundler.d")
if (local_bundler_d.exist? && local_bundler_d.glob("*.rb").any?) ||
(global_bundler_d.exist? && global_bundler_d.glob("*.rb").any?)
bundler_inject_files = local_bundler_d.glob("*.rb") + global_bundler_d.glob("*.rb")

if bundler_inject_files.any?
STDERR.puts "ERROR: You cannot run generate_lockfile with bundler-inject files present."
STDERR.puts "files found: #{bundler_inject_files.join(", ")}"
exit 1
end

Expand Down

0 comments on commit e7ae628

Please sign in to comment.