ekohl / metadata_json_deps

MIT License
3 stars 13 forks source link

Add checks for deprecated modules #7

Closed ekohl closed 2 years ago

bastelfreak commented 2 years ago

works for me:

bastelfreak@bastelfreak-nb ~/code/modulesync_config/modules/voxpupuli/puppet-borg $ bundle exec metadata-json-deps metadata.json -v
Checking metadata.json
  saz/ssh (>= 4.0.0 < 9.0.0) matches 8.0.0
  puppetlabs/vcsrepo (>= 2.0.0 < 6.0.0) matches 5.0.0
  puppet/systemd (>= 0.4.0 < 4.0.0) matches 3.5.2
  puppetlabs/stdlib (>= 4.25.1 < 9.0.0) matches 8.1.0
  puppet/ssh_keygen (>= 4.1.0 < 6.0.0) matches 5.0.1
bastelfreak@bastelfreak-nb ~/code/modulesync_config/modules/voxpupuli/puppet-borg $ vim metadata.json
bastelfreak@bastelfreak-nb ~/code/modulesync_config/modules/voxpupuli/puppet-borg $ bundle exec metadata-json-deps metadata.json -v
Checking metadata.json
  saz/ssh (>= 4.0.0 < 9.0.0) matches 8.0.0
  puppetlabs/vcsrepo (>= 2.0.0 < 6.0.0) matches 5.0.0
  camptocamp/systemd was superseded by puppet-systemd
  puppetlabs/stdlib (>= 4.25.1 < 9.0.0) matches 8.1.0
  puppet/ssh_keygen (>= 4.1.0 < 6.0.0) matches 5.0.1
bastelfreak@bastelfreak-nb ~/code/modulesync_config/modules/voxpupuli/puppet-borg $ git diff
diff --git a/Gemfile b/Gemfile
index b6dcf45..4dd64cb 100644
--- a/Gemfile
+++ b/Gemfile
@@ -30,5 +30,5 @@ gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]

 puppetversion = ENV['PUPPET_VERSION'] || '>= 6.0'
 gem 'puppet', puppetversion, :require => false, :groups => [:test]
-
+gem 'metadata_json_deps', git: 'https://github.com/ekohl/metadata_json_deps', branch: 'check-deprecated-modules'
 # vim: syntax=ruby
diff --git a/metadata.json b/metadata.json
index 5fb568a..619b8ff 100644
--- a/metadata.json
+++ b/metadata.json
@@ -24,7 +24,7 @@
       "version_requirement": ">= 2.0.0 < 6.0.0"
     },
     {
-      "name": "puppet/systemd",
+      "name": "camptocamp/systemd",
       "version_requirement": ">= 0.4.0 < 4.0.0"
     },
     {
bastelfreak@bastelfreak-nb ~/code/modulesync_config/modules/voxpupuli/puppet-borg $

I'm fine with merging it after the CI is fixed.

ekohl commented 2 years ago

Not entirely unsurprising, but now CI actually runs :D