capistrano_deploy_lock 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTMyMmZhNmNhMWViYzU5NjNiYzFkM2NiMTFjNWMwMDUxNTk2N2Y4ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTYzNDA4MDk1MDY3YmViMDhiNTRlODllNWJiNDRmYzRmYzYzMjc0ZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGZkYzE1YTcwMTcyYWFhYWVlZmNjOTQzZmY0NWI3NDkxMDUyY2ZkNzNhMWNm
|
10
|
+
MWU2YTFmNmQ2ZDZlZWRhNWZkYjI1NmNjMWMzYmNlMzRkYjMwY2JmYmY5ZjQz
|
11
|
+
YzI3NjY5MGQ1Mjc0MDcyZmMxOTQwMmQ2YjRjOGEzNjZmOTEwMzg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Njg2ZWYyYjE3YWQ5MmFlZTlhMmZhMTNkODAyNTAwMjMzZDQ2OTc4NmNlNjFm
|
14
|
+
YjZmMmI4MDllYjU4NGFjZmY4NzBmYjcyYzJkNGE4MGM0ZjRlYWM3ZTI5ZmZh
|
15
|
+
ZWRlYTU4YWRjMzM3NDBkOGExNjZiYWUxNTI5NTdhNWYyNTJjNmE=
|
@@ -18,7 +18,11 @@ module Capistrano
|
|
18
18
|
|
19
19
|
module DeployLock
|
20
20
|
def self.message(application, stage, deploy_lock)
|
21
|
-
|
21
|
+
if stage
|
22
|
+
message = "#{application} (#{stage}) was locked"
|
23
|
+
else
|
24
|
+
message = "#{application} was locked"
|
25
|
+
end
|
22
26
|
if defined?(Capistrano::DateHelper)
|
23
27
|
locked_ago = Capistrano::DateHelper.distance_of_time_in_words_to_now deploy_lock[:created_at].localtime
|
24
28
|
message << " #{locked_ago} ago"
|
@@ -57,7 +61,7 @@ module Capistrano
|
|
57
61
|
message << "\nLock expired at #{deploy_lock[:expire_at].localtime.strftime("%H:%M:%S")}"
|
58
62
|
end
|
59
63
|
else
|
60
|
-
message << "\nLock must be manually removed with: cap #{stage}
|
64
|
+
message << "\nLock must be manually removed with: cap #{stage ? stage + ' ' : ''}deploy:unlock"
|
61
65
|
end
|
62
66
|
end
|
63
67
|
end
|
@@ -66,4 +70,4 @@ end
|
|
66
70
|
# Load recipe if required from deploy script
|
67
71
|
if defined?(Capistrano::Configuration) && Capistrano::Configuration.instance
|
68
72
|
require 'capistrano/recipes/deploy_lock'
|
69
|
-
end
|
73
|
+
end
|
@@ -134,7 +134,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
134
134
|
self[:custom_deploy_lock] = deploy_lock[:custom]
|
135
135
|
|
136
136
|
# Unexpired lock is present, so display the lock message
|
137
|
-
logger.important Capistrano::DeployLock.message(application, stage, deploy_lock)
|
137
|
+
logger.important Capistrano::DeployLock.message(application, (respond_to?(:stage) ? stage : nil), deploy_lock)
|
138
138
|
|
139
139
|
# Don't raise exception if current user owns the lock, and lock has an expiry time.
|
140
140
|
# Just sleep for a few seconds so they have a chance to cancel the deploy with Ctrl-C
|