Class: Kamal::Commands::Lock
- Inherits:
-
Base
- Object
- Base
- Kamal::Commands::Lock
show all
- Defined in:
- lib/kamal/commands/lock.rb
Constant Summary
Constants inherited
from Base
Base::DOCKER_HEALTH_STATUS_FORMAT
Instance Attribute Summary
Attributes inherited from Base
#config
Instance Method Summary
collapse
Methods inherited from Base
#container_id_for, #initialize, #make_directory, #make_directory_for, #remove_directory, #remove_file, #run_over_ssh
Instance Method Details
#acquire(message, version) ⇒ Object
6
7
8
9
10
|
# File 'lib/kamal/commands/lock.rb', line 6
def acquire(message, version)
combine \
[ :mkdir, lock_dir ],
write_lock_details(message, version)
end
|
#ensure_locks_directory ⇒ Object
24
25
26
|
# File 'lib/kamal/commands/lock.rb', line 24
def ensure_locks_directory
[ :mkdir, "-p", locks_dir ]
end
|
#release ⇒ Object
12
13
14
15
16
|
# File 'lib/kamal/commands/lock.rb', line 12
def release
combine \
[ :rm, lock_details_file ],
[ :rm, "-r", lock_dir ]
end
|
#status ⇒ Object
18
19
20
21
22
|
# File 'lib/kamal/commands/lock.rb', line 18
def status
combine \
stat_lock_dir,
read_lock_details
end
|