Created
April 2, 2019 17:40
-
-
Save ekohl/206bdd9fe7adb1bb22c61b491ed0ee75 to your computer and use it in GitHub Desktop.
Show puppet module versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'librarian/puppet' | |
librarian_environment = Librarian::Puppet::Environment.new(pwd: 'Puppetfile.lock') | |
librarian_environment.lock.manifests.sort_by { |manifest| manifest.name.split('-').last }.each do |manifest| | |
author, name = manifest.name.split('-') | |
if ['theforeman', 'katello'].include?(author) | |
branch = "#{manifest.version.to_s.split('.')[0..1].join('.')}-stable" | |
puts "puppet-#{name} #{branch} #{manifest.version}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment