Skip to content

Commit

Permalink
Merge pull request #151 from block/myron/commit-gemfile-lock-when-rel…
Browse files Browse the repository at this point in the history
…easing

Commit an update to `Gemfile.lock` when bumping the version.
  • Loading branch information
myronmarston authored Feb 7, 2025
2 parents 92988d8 + 0a2cd26 commit f98e4a5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/release/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# That's why we get the project root from git instead of using `__dir__`.
project_root = `git rev-parse --show-toplevel`.strip

require "bundler"
require "gem/release"
require "#{project_root}/elasticgraph-support/lib/elastic_graph/version"
require "#{project_root}/script/list_eg_gems"
Expand All @@ -19,6 +20,13 @@ task :bump_version, [:version] do |_, args|
version = args.fetch(:version)
::Dir.chdir(project_root) do
sh "bundle exec gem bump elasticgraph-support --file #{project_root}/elasticgraph-support/lib/elastic_graph/version.rb -v #{version} -m 'Release v#{version}.'"

# We also want to commit an update to `Gemfile.lock` as part of the version bump.
::Bundler.with_unbundled_env do
sh "bundle install"
sh "git add Gemfile.lock"
sh "git commit --amend --no-edit"
end
end
end

Expand Down

0 comments on commit f98e4a5

Please sign in to comment.