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

Add install gemset task #1580

Merged
merged 1 commit into from
Jul 8, 2021
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
19 changes: 14 additions & 5 deletions tasks/update_appraisal_gemfiles.rake
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,26 @@ TRACER_VERSIONS = %w[
jruby-9.2-latest
].freeze

desc 'Update gemfiles/* files based on Appraisals and Gemfile changes, ' \
desc 'Installs gems based on Appraisals and Gemfile changes, ' \
'accepts list of tracer versions as task argument, defaults to all versions.'
task :install_appraisal_gemfiles do |_task, args|
tracer_version_arg = args.to_a
versions = tracer_version_arg.empty? ? TRACER_VERSIONS : tracer_version_arg

versions.each do |version|
sh "docker-compose run --rm tracer-#{version} /bin/bash -c " \
"'rm -f Gemfile.lock && bundle install && bundle exec appraisal install'"
end
end

desc 'Update ALL gems based on Appraisals and Gemfile changes, ' \
'accepts list of tracer versions as task argument, defaults to all versions.'
task :update_appraisal_gemfiles do |_task, args|
tracer_version_arg = args.to_a
versions = tracer_version_arg.empty? ? TRACER_VERSIONS : tracer_version_arg

versions.each do |version|
cmd = "docker-compose run --rm tracer-#{version} /bin/bash -c " \
sh "docker-compose run --rm tracer-#{version} /bin/bash -c " \
"'rm -f Gemfile.lock && bundle install && bundle exec appraisal update'"

puts cmd
sh cmd
end
end