Skip to content

Commit

Permalink
Use gemfile.d for upstream CI
Browse files Browse the repository at this point in the history
The gemspec shouldn't contain environment variables, because it's also
used in other contexts where it could break.

In common CI we read gemfile.d/*.rb so this is the best place for
bundler overrides.

Fixes: 3eedb81 ("feat(actions): switch to upstream CI templates (dm-drogeriemarkt#113)")
  • Loading branch information
ekohl committed Apr 9, 2024
1 parent 861f54c commit 68f11b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 1 addition & 7 deletions foreman_wreckingball.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ Gem::Specification.new do |s|
s.test_files = Dir['test/**/*']

s.add_dependency 'foreman_puppet'

case ENV['FOREMAN_VERSION']
when '3.7-stable', '3.8-stable'
s.add_dependency 'foreman-tasks', '>= 8.0.0', '< 9.0.0'
else
s.add_dependency 'foreman-tasks'
end
s.add_dependency 'foreman-tasks'

s.add_development_dependency 'rdoc'
s.add_development_dependency 'theforeman-rubocop', '~> 0.1.2'
Expand Down
4 changes: 4 additions & 0 deletions gemfile.d/tasks.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
case ENV['FOREMAN_VERSION']
when '3.7-stable', '3.8-stable'
gem 'foreman-tasks', '~> 8.0'
end

0 comments on commit 68f11b4

Please sign in to comment.