Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit an update to Gemfile.lock when bumping the version. #151

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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