voxpupuli / puppet-blacksmith

Ruby Gem with Puppet Module utilities
Apache License 2.0
69 stars 31 forks source link

Implement `clean` rake task #97

Closed bastelfreak closed 3 years ago

bastelfreak commented 3 years ago

The task is available in puppetlabs_spec_helper with the same code. Previously puppet-blacksmith used the task from PSH but didn't require it and didn't depend on it in the gemspec. Instead of adding the dependencies we implement it here.

bastelfreak commented 3 years ago

I tested this locally and it didn't look too bad:

bastelfreak@bastelfreak-nb ~/code/modulesync_config/modules/voxpupuli/puppet-wireguard $ bundle exec rake travis_release
Cleaning for module build
Bumping version from 0.6.1 to 0.6.2-rc0
bastelfreak@bastelfreak-nb ~/code/modulesync_config/modules/voxpupuli/puppet-wireguard $ git diff
diff --git a/Gemfile b/Gemfile
index b1d72f0..bf873e4 100644
--- a/Gemfile
+++ b/Gemfile
@@ -22,6 +22,7 @@ end

 group :release do
   gem 'github_changelog_generator', '>= 1.16.1',  :require => false
+  gem 'puppet-blacksmith', git: 'https://github.com/bastelfreak/puppet-blacksmith', branch: 'clean', require: false
   gem 'voxpupuli-release', '>= 1.0.2',            :require => false
   gem 'puppet-strings', '>= 2.2',                 :require => false
 end
bastelfreak@bastelfreak-nb ~/code/modulesync_config/modules/voxpupuli/puppet-wireguard $ 
bastelfreak commented 3 years ago

I also considered cleaning the fixtures directory but that's a bit tricky. some modules ship some fixtures so we need to be careful with the path and I didn't want the change the previous logic, just make it work again.

bastelfreak commented 3 years ago

release worked as well: