Skip to content

Commit

Permalink
Merge pull request #472 from puppetlabs/bug-use_modulebuilder_build_task
Browse files Browse the repository at this point in the history
(breaking) - Remove build rake tasks
  • Loading branch information
danadoherty639 committed Sep 17, 2024
2 parents a2e1384 + f9878f8 commit bd115b1
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions lib/puppetlabs_spec_helper/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,35 +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/')
end

require 'puppet-lint/tasks/puppet-lint'
# Must clear as it will not override the existing puppet-lint rake task since we require to import for
# the PuppetLint::RakeTask
Expand Down

0 comments on commit bd115b1

Please sign in to comment.