From aed2aa374c4f8885ad0c02149cec97d7c1bcb279 Mon Sep 17 00:00:00 2001 From: jordanbreen28 Date: Wed, 11 Sep 2024 16:23:49 +0100 Subject: [PATCH 1/2] (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. --- lib/puppetlabs_spec_helper/rake_tasks.rb | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/lib/puppetlabs_spec_helper/rake_tasks.rb b/lib/puppetlabs_spec_helper/rake_tasks.rb index dfc0b3fd..d2203bc4 100644 --- a/lib/puppetlabs_spec_helper/rake_tasks.rb +++ b/lib/puppetlabs_spec_helper/rake_tasks.rb @@ -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/') From f9878f81db5d7b29cc16dcb16f622e3353c8aa02 Mon Sep 17 00:00:00 2001 From: jordanbreen28 Date: Tue, 17 Sep 2024 09:12:33 +0100 Subject: [PATCH 2/2] (CAT-2056) - Remove 'rake clean' task --- lib/puppetlabs_spec_helper/rake_tasks.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/puppetlabs_spec_helper/rake_tasks.rb b/lib/puppetlabs_spec_helper/rake_tasks.rb index d2203bc4..a0bb99db 100644 --- a/lib/puppetlabs_spec_helper/rake_tasks.rb +++ b/lib/puppetlabs_spec_helper/rake_tasks.rb @@ -121,11 +121,6 @@ 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