Switch to a Commander base to allow lazy loading config
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
require_relative "setup"
|
||||
|
||||
registry = Mrsk::Commands::Registry.new(MRSK_CONFIG)
|
||||
|
||||
namespace :mrsk do
|
||||
namespace :registry do
|
||||
desc "Login to the registry locally and remotely"
|
||||
task :login do
|
||||
run_locally { execute *registry.login }
|
||||
on(MRSK_CONFIG.hosts) { execute *registry.login }
|
||||
run_locally { execute *MRSK.registry.login }
|
||||
on(MRSK.config.hosts) { execute *MRSK.registry.login }
|
||||
end
|
||||
|
||||
desc "Logout of the registry remotely"
|
||||
task :logout do
|
||||
on(MRSK_CONFIG.hosts) { execute *registry.logout }
|
||||
on(MRSK.config.hosts) { execute *MRSK.registry.logout }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user