Class: Kamal::Cli::Lock
- Inherits:
-
Base
- Object
- Thor
- Base
- Kamal::Cli::Lock
show all
- Defined in:
- lib/kamal/cli/lock.rb
Instance Method Summary
collapse
Methods inherited from Base
exit_on_failure?, #initialize
Instance Method Details
#acquire ⇒ Object
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/kamal/cli/lock.rb', line 14
def acquire
message = options[:message]
raise_if_locked do
on(KAMAL.primary_host) do
execute *KAMAL.server.ensure_run_directory
execute *KAMAL.lock.acquire(message, KAMAL.config.version), verbosity: :debug
end
say "Acquired the deploy lock"
end
end
|
#release ⇒ Object
26
27
28
29
30
31
32
33
34
|
# File 'lib/kamal/cli/lock.rb', line 26
def release
handle_missing_lock do
on(KAMAL.primary_host) do
execute *KAMAL.server.ensure_run_directory
execute *KAMAL.lock.release, verbosity: :debug
end
say "Released the deploy lock"
end
end
|
#status ⇒ Object
3
4
5
6
7
8
9
10
|
# File 'lib/kamal/cli/lock.rb', line 3
def status
handle_missing_lock do
on(KAMAL.primary_host) do
execute *KAMAL.server.ensure_run_directory
puts capture_with_debug(*KAMAL.lock.status)
end
end
end
|