Skip to content

Commit 9b9bb25

Browse files
committed
(breaking) - Remove build rake tasks
This commit removes the build rake tasks from puppetlabs_spec_helper, as it does not make sense to have these exist in a gem which sole purpose is to help unit testing. As such, we will add the build rake task to puppet-modulebuilder.
1 parent 6e600d1 commit 9b9bb25

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

lib/puppetlabs_spec_helper/rake_tasks.rb

-24
Original file line numberDiff line numberDiff line change
@@ -121,30 +121,6 @@
121121
end
122122
end
123123

124-
desc 'Build puppet module package'
125-
task :build do
126-
Rake::Task['build:pdk'].invoke
127-
end
128-
129-
namespace :build do
130-
desc 'Build Puppet module with PDK'
131-
task :pdk do
132-
require 'pdk/util'
133-
require 'pdk/module/build'
134-
135-
path = PDK::Module::Build.invoke(force: true, 'target-dir': File.join(Dir.pwd, 'pkg'))
136-
puts "Module built: #{path}"
137-
rescue LoadError
138-
_ = `pdk --version`
139-
unless $CHILD_STATUS.success?
140-
warn 'Unable to build module. Please install PDK or add the `pdk` gem to your Gemfile.'
141-
abort
142-
end
143-
144-
system('pdk build --force')
145-
end
146-
end
147-
148124
desc 'Clean a built module package'
149125
task :clean do
150126
FileUtils.rm_rf('pkg/')

puppetlabs_spec_helper.gemspec

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
3131
spec.add_runtime_dependency 'mocha', '>= 1.0', '< 3'
3232
spec.add_runtime_dependency 'pathspec', '>= 0.2', '< 3'
3333
spec.add_runtime_dependency 'puppet-lint', '~> 4.0'
34+
spec.add_runtime_dependency 'puppet-modulebuilder', '~> 1.0'
3435
spec.add_runtime_dependency 'puppet-syntax', '~> 4.1', '>= 4.1.1'
3536
spec.add_runtime_dependency 'rspec-github', '~> 2.0'
3637
spec.add_runtime_dependency 'rspec-puppet', '~> 5.0'

0 commit comments

Comments
 (0)