Skip to content

(breaking) - Remove build rake tasks #472

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

Merged
merged 2 commits into from
Sep 17, 2024
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
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