crazycode-cap-recipes 0.3.39 → 0.3.39.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/crazycode-cap-recipes.gemspec +1 -1
- data/lib/cap_recipes/tasks/gitdeploy/setup.rb +6 -5
- metadata +2 -1
data/VERSION.yml
CHANGED
@@ -30,7 +30,7 @@ Capistrano::Configuration.instance(true).load do |configuration|
|
|
30
30
|
"/tmp/localgit_#{application}"
|
31
31
|
end
|
32
32
|
set :local_gitrepo do
|
33
|
-
"#{local_git_dir}
|
33
|
+
"#{local_git_dir}/#{application}"
|
34
34
|
end
|
35
35
|
|
36
36
|
namespace :gitdeploy do
|
@@ -54,6 +54,7 @@ Capistrano::Configuration.instance(true).load do |configuration|
|
|
54
54
|
desc "tag build version. use -s tag=xxx to set tag's name"
|
55
55
|
task :tag do
|
56
56
|
gitdeploy.setup_local
|
57
|
+
|
57
58
|
tag_name = configuration[:tag]
|
58
59
|
if tag_name.nil?
|
59
60
|
rails "NO tag. pls use -s tag=xxx set tag_name"
|
@@ -74,13 +75,12 @@ Capistrano::Configuration.instance(true).load do |configuration|
|
|
74
75
|
system "cd #{local_gitrepo}; git add .; git commit -m 'tag with #{tag_name}'; git tag #{tag_name};"
|
75
76
|
|
76
77
|
# push tags and latest code
|
77
|
-
system "cd #{local_gitrepo}"
|
78
|
-
system "git push origin #{branch}"
|
78
|
+
system "cd #{local_gitrepo}; git push origin #{branch}"
|
79
79
|
if $? != 0
|
80
80
|
raise "git push failed"
|
81
81
|
end
|
82
82
|
|
83
|
-
system "git push origin #{branch} --tags"
|
83
|
+
system "cd #{local_gitrepo}; git push origin #{branch} --tags"
|
84
84
|
if $? != 0
|
85
85
|
raise "git push --tags failed"
|
86
86
|
end
|
@@ -110,8 +110,9 @@ Capistrano::Configuration.instance(true).load do |configuration|
|
|
110
110
|
|
111
111
|
def self.update_repository_local_command(name, war)
|
112
112
|
[
|
113
|
+
"cd #{local_gitrepo}",
|
113
114
|
"if [ -e #{local_gitrepo}/#{name} ]",
|
114
|
-
"then rm -
|
115
|
+
"then git rm -rf #{local_gitrepo}/#{name}",
|
115
116
|
"fi",
|
116
117
|
"mkdir -p #{local_gitrepo}/#{name}",
|
117
118
|
"cd #{local_gitrepo}/#{name}",
|