Skip to content

Commit

Permalink
remove unneeded filecheck; cleanup module name split; sort modules
Browse files Browse the repository at this point in the history
  • Loading branch information
zilchms committed Mar 20, 2024
1 parent d26df18 commit bf7fcfc
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions bin/outdated_modules_and_their_version
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,21 @@ mod_ary = []
width_modules = 6
# min width is width of String "modulesync_config version"
width_version = 25
Dir.glob('modules/voxpupuli/puppet-*').each do |f|
if File.directory?(f)
if File.exists?(f + '/.msync.yml')
version_module = YAML.load_file(f + '/.msync.yml')['modulesync_config_version']
mod = (f + '/.msync.yml').split('/')[2]
if version != version_module
mod_ary.push([mod, version_module])
width_modules = [width_modules, mod.length].max
width_version = [width_version, version_module.length].max
end
else
version_module = 'None'
mod = (f + '/.msync.yml').split('/')[2]
Dir.glob('modules/voxpupuli/puppet-*').sort.each do |f|
if File.exists?(f + '/.msync.yml')
version_module = YAML.load_file(f + '/.msync.yml')['modulesync_config_version']
mod = (f).split('/')[2]
if version != version_module
mod_ary.push([mod, version_module])
width_modules = [width_modules, mod.length].max
width_version = [width_version, version_module.length].max
end
else
version_module = 'None'
mod = (f).split('/')[2]
mod_ary.push([mod, version_module])
width_modules = [width_modules, mod.length].max
width_version = [width_version, version_module.length].max
end
end

Expand Down

0 comments on commit bf7fcfc

Please sign in to comment.