capistrano_multiconfig_parallel 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b470f4de93b37af27d50688a0727461af844e4e
|
4
|
+
data.tar.gz: c270b935db211232b3150c225db50eff605c0b03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bba067afc7d3e6728ae82eb23a0b2f0b5701ca81f5a9ed876d821b9ec41d7cbd620f5afddf953faaacbc156b632d9305e0865ca336b73d221c5a2aeec8bf445
|
7
|
+
data.tar.gz: 5dcab7ebf63b73e79b89e8f4301ac126860a4b369178e99eba7af512cb7bdc492b68e022ce8726840d85834255c1c6863a0fd764cf5ce58c444a346dc9f8e99d
|
@@ -89,28 +89,6 @@ module CapistranoMulticonfigParallel
|
|
89
89
|
@rake_tasks ||= []
|
90
90
|
end
|
91
91
|
|
92
|
-
def last_staging_tag
|
93
|
-
last_tag_matching('staging-*')
|
94
|
-
end
|
95
|
-
|
96
|
-
def last_tag_matching(pattern)
|
97
|
-
# search for most recent (chronologically) tag matching the passed pattern, then get the name of that tag.
|
98
|
-
last_tag = `#{cd_working_directory} && git describe --exact-match --tags --match='#{pattern}' $(git log --tags='#{pattern}*' -n1 --pretty='%h')`.chomp
|
99
|
-
debug("LAST TAG is #{last_tag}") if debug_enabled?
|
100
|
-
last_tag == '' ? nil : last_tag
|
101
|
-
end
|
102
|
-
|
103
|
-
def staging_was_tagged?
|
104
|
-
begin
|
105
|
-
current_sha = `#{cd_working_directory} && git log --pretty=format:%H HEAD -1`
|
106
|
-
debug("curent SHA is #{current_sha}") if debug_enabled?
|
107
|
-
last_staging_tag_sha = last_staging_tag ? `#{cd_working_directory} && git log --pretty=format:%H #{last_staging_tag} -1` : nil
|
108
|
-
debug("LAST TAGGING SHA is #{last_staging_tag_sha}") if debug_enabled?
|
109
|
-
last_staging_tag_sha == current_sha
|
110
|
-
rescue
|
111
|
-
return false
|
112
|
-
end
|
113
|
-
end
|
114
92
|
|
115
93
|
def cd_working_directory
|
116
94
|
"cd #{CapistranoMulticonfigParallel.detect_root.to_s}"
|
@@ -148,7 +126,7 @@ module CapistranoMulticonfigParallel
|
|
148
126
|
|
149
127
|
def handle_subscription(message)
|
150
128
|
if message_is_about_a_task?(message)
|
151
|
-
if @env_name == 'staging' && @manager.can_tag_staging?
|
129
|
+
if @env_name == 'staging' && @manager.can_tag_staging? && has_executed_task?(CapistranoMulticonfigParallel::GITFLOW_TAG_STAGING_TASK)
|
152
130
|
@manager.dispatch_new_job(@job.merge('env' => 'production'))
|
153
131
|
end
|
154
132
|
save_tasks_to_be_executed(message)
|