Skip to content

Commit

Permalink
(breaking) - Remove build rake tasks
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jordanbreen28 committed Sep 13, 2024
1 parent 6e600d1 commit d1f6fe0
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions lib/puppetlabs_spec_helper/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,30 +121,6 @@
end
end

desc 'Build puppet module package'
task :build do
Rake::Task['build:pdk'].invoke
end

namespace :build do
desc 'Build Puppet module with PDK'
task :pdk do
require 'pdk/util'
require 'pdk/module/build'

path = PDK::Module::Build.invoke(force: true, 'target-dir': File.join(Dir.pwd, 'pkg'))
puts "Module built: #{path}"
rescue LoadError
_ = `pdk --version`
unless $CHILD_STATUS.success?
warn 'Unable to build module. Please install PDK or add the `pdk` gem to your Gemfile.'
abort
end

system('pdk build --force')
end
end

desc 'Clean a built module package'
task :clean do
FileUtils.rm_rf('pkg/')
Expand Down

0 comments on commit d1f6fe0

Please sign in to comment.