Version comes from config

This commit is contained in:
David Heinemeier Hansson
2023-02-03 13:52:10 +01:00
parent ad26bce5a2
commit 3bd2559c03
2 changed files with 3 additions and 8 deletions

View File

@@ -31,13 +31,8 @@ class Mrsk::Cli::App < Mrsk::Cli::Base
end
desc "start", "Start existing app on servers (use --version=<git-hash> to designate specific version)"
option :version, desc: "Defaults to the most recent git-hash in local repository"
def start
if (version = options[:version]).present?
on(MRSK.hosts) { execute *MRSK.app.start(version: version) }
else
on(MRSK.hosts) { execute *MRSK.app.start, raise_on_non_zero_exit: false }
end
on(MRSK.hosts) { execute *MRSK.app.start, raise_on_non_zero_exit: false }
end
desc "stop", "Stop app on servers"

View File

@@ -19,8 +19,8 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
role.cmd
end
def start(version: config.version)
docker :start, service_with_version(version)
def start
docker :start, service_with_version
end
def current_container_id