nogara-capistrano-conditional 0.0.3 → 0.0.4
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
|
+
N2I2OGM4NGY2MGZkZTIwM2ZmNzk1YThjNmI0ZDQ5ZjA5YjkzOTVhZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmMwOGUwYmY0YjEwYzE5NTBhMGQ1MmVhZGUwNGEyZjAwNDU2NDBmNg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTIwOWVlYmZmMjc2NmQ2YTgzNjZhYzliZTQ2M2ExYmIxOTYxNzhhNWRhYjFk
|
10
|
+
ZTJhMWIzY2Y0MGU5NWI3NDYwMWU1NjBhYjliMGQxODNjMzJkMDg5NDNlNzg3
|
11
|
+
MjcxYzUyNDNhZTU3MTdlOWE1YzA3ZDMyODQ2MDk3ZmI1YzQ0NGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2YwNDNjOGJmYmE5OGUxYjk5ZGZkYTdmZDBiM2Q5MWQzNDBlNjZiYjA3NGUx
|
14
|
+
YTJmYmNiZjU0OTk0MWRiM2MxYjBjZWY2ZjZiM2IwNWMzNDllZTk4NTc2NGFj
|
15
|
+
NGIxMGEyYjMyZmViYjFhZmE2NjU1YTg3ZWQyMGRiNGQxOGIxNmU=
|
@@ -8,12 +8,13 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
8
8
|
deployed_hash = capture("cat #{current_path}/REVISION").strip
|
9
9
|
ConditionalDeploy.apply_conditions!( deployed_hash )
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
desc "Tests to be sure that the newest local and remote git commits match"
|
13
13
|
task :ensure_latest_git do
|
14
|
-
remote = capture("cd #{shared_path}/cached-copy && git log --format=oneline -n 1", :pty => false)
|
15
|
-
|
16
|
-
|
14
|
+
remote = capture("cd #{shared_path}/cached-copy && git log --encoding=UTF-8 --format=oneline -n 1", :pty => false)
|
15
|
+
remote = remote.force_encoding("UTF-8")
|
16
|
+
local = run_locally("git log --encoding=UTF-8 --format=oneline -n 1")
|
17
|
+
|
17
18
|
unless local == remote
|
18
19
|
abort("\nLocal and remote git repositories have different HEADs:\n Local: #{local} Remote: #{remote}\n Make sure you've committed your latest changes, or else pull down the remote updates and try again\n")
|
19
20
|
end
|
@@ -23,7 +24,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
23
24
|
# Ensure deploys apply conditional elements before running the rest of the tasks
|
24
25
|
before 'deploy', 'conditional:apply'
|
25
26
|
before 'deploy:migrations', 'conditional:apply'
|
26
|
-
|
27
|
+
|
27
28
|
# Abort deployment if mismatch between local and remote git repositories
|
28
29
|
after 'deploy:update_code', 'conditional:ensure_latest_git'
|
29
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nogara-capistrano-conditional
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kali Donovan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|