Proper versioning for console and bash
This commit is contained in:
@@ -69,23 +69,19 @@ class Mrsk::Cli::App < Mrsk::Cli::Base
|
|||||||
|
|
||||||
desc "console", "Start Rails Console on primary host (or specific host set by --hosts)"
|
desc "console", "Start Rails Console on primary host (or specific host set by --hosts)"
|
||||||
def console
|
def console
|
||||||
using_version(options[:version] || most_recent_version_available) do
|
say "Get most recent version available as an image...", :magenta unless options[:version]
|
||||||
run_locally do
|
using_version(options[:version] || most_recent_version_available) do |version|
|
||||||
if version
|
say "Launching Rails console of version #{version} on #{MRSK.primary_host}...", :magenta
|
||||||
info "Launching Rails console on #{MRSK.primary_host} [Version: #{version}]"
|
run_locally { exec MRSK.app.console(host: MRSK.primary_host) }
|
||||||
exec MRSK.app.console(host: MRSK.primary_host)
|
|
||||||
else
|
|
||||||
error "No image available for #{MRSK.config.repository}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "bash", "Start a bash session on primary host (or specific host set by --hosts)"
|
desc "bash", "Start a bash session on primary host (or specific host set by --hosts)"
|
||||||
def bash
|
def bash
|
||||||
run_locally do
|
say "Get most recent version available as an image...", :magenta unless options[:version]
|
||||||
info "Launching bash session on #{MRSK.primary_host}"
|
using_version(options[:version] || most_recent_version_available) do |version|
|
||||||
exec MRSK.app.bash(host: MRSK.primary_host)
|
say "Launching bash session of version #{version} on #{MRSK.primary_host}...", :magenta
|
||||||
|
run_locally { exec MRSK.app.bash(host: MRSK.primary_host) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user