[WIP] Allow updating all plugins when building the lockfile
The lockfile generator is very conservative and doesn't update the lockfile refs for git repos (i.e. plugins). As such, when gem updates happen in plugins, they aren't automatically pulled into the lockfile. This new option allows me to see which specific plugins are making changes. I can then choose to just update them all, or pick and choose.
@bdunne Please review.
I've also considered pushing does that weird repo path scanning logic into Vmdb::Plugins - if that's preferable, let me know. I only didn't do it because I couldn't decide on the key/method name.
────────────────────────────────────────────────────────
modified: lib/tasks/release.rake
────────────────────────────────────────────────────────
@ lib/tasks/release.rake:190 @ namespace :release do
update_gems = ENV["UPDATE_GEMS"].to_s.split(" ")
if ENV["UPDATE_PLUGINS"]
require "vmdb/plugins"
- update_gems += Vmdb::Plugins.paths.values.map { |p| p.match(%r{/gems/(.+)-\h+$}).captures.first }
+ update_gems += Vmdb::Plugins.repos.values
end
root = Pathname.new(__dir__).join("../..")
────────────────────────────────────────────────────────
modified: lib/vmdb/plugins.rb
────────────────────────────────────────────────────────
@ lib/vmdb/plugins.rb:37 @ def details
hash[engine] = {
:name => engine.name,
:version => version(engine),
- :path => engine.root.to_s
+ :path => engine.root.to_s,
+ :repo => engine.root.to_s.match(%r{/gems/(.+)-\h+$}).captures.first
}
end
end
@ lib/vmdb/plugins.rb:51 @ def versions
details.transform_values { |v| v[:version] }
end
+ def repos
+ details.transform_values { |v| v[:repo] }
+ end
+
# Ansible content (roles) that come out-of-the-box, for use by both Automate
# and ansible-runner
def ansible_content
Moved to WIP because when you are running from a plug-in the path is your local dev path. Need to handle that case and be more defensive here in general.
This pull request has been automatically marked as stale because it has not been updated for at least 3 months.
If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).
This pull request has been automatically marked as stale because it has not been updated for at least 3 months.
If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).