capistrano-gity 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/capistrano-gity.rb +18 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/lib/capistrano-gity.rb
CHANGED
@@ -62,12 +62,29 @@ Capistrano::Configuration.instance.load do
|
|
62
62
|
uptip
|
63
63
|
end
|
64
64
|
|
65
|
+
def quit?
|
66
|
+
upstream_master = `git rev-parse #{remote}/master`
|
67
|
+
here = `git rev-parse HEAD`
|
68
|
+
if here != upstream_master
|
69
|
+
puts <<-MSG
|
70
|
+
The commit you are pushing is different from #{remote} master.
|
71
|
+
This means that a subsequent deploy might not include your work.
|
72
|
+
Consider pushing to master now or later.
|
73
|
+
MSG
|
74
|
+
answer = Capistrano::CLI.ui.ask("Do you want to coninue? (y/n)")
|
75
|
+
return !answer.downcase.start_with?('y')
|
76
|
+
end
|
77
|
+
return false
|
78
|
+
end
|
79
|
+
|
65
80
|
task :prepare_deploy do
|
81
|
+
sync
|
82
|
+
exit if quit?
|
66
83
|
push
|
67
84
|
uptip
|
68
85
|
end
|
69
86
|
|
70
|
-
before 'deploy', 'gity:prepare_deploy'
|
87
|
+
before 'deploy:update_code', 'gity:prepare_deploy'
|
71
88
|
|
72
89
|
end
|
73
90
|
end
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 3
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Skroutz.gr Team
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-04-14 00:00:00 +03:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|