crazycode-cap-recipes 0.4.12 → 0.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +1 -1
- data/crazycode-cap-recipes.gemspec +2 -2
- data/lib/cap_recipes/tasks/gitdeploy/setup.rb +15 -8
- metadata +3 -3
data/VERSION.yml
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{crazycode-cap-recipes}
|
|
8
|
-
s.version = "0.4.
|
|
8
|
+
s.version = "0.4.13"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["crazycode"]
|
|
12
|
-
s.date = %q{2011-
|
|
12
|
+
s.date = %q{2011-09-01}
|
|
13
13
|
s.default_executable = %q{cap-recipes}
|
|
14
14
|
s.description = %q{Battle-tested capistrano recipes for debian, passenger, apache, hudson, delayed_job, juggernaut, rubygems, backgroundrb, rails and more}
|
|
15
15
|
s.email = %q{crazycode@gmail.com}
|
|
@@ -56,12 +56,6 @@ Capistrano::Configuration.instance(true).load do |configuration|
|
|
|
56
56
|
task :tag do
|
|
57
57
|
gitdeploy.setup_local
|
|
58
58
|
|
|
59
|
-
tag_name = configuration[:tag] || configuration[:build_version]
|
|
60
|
-
if tag_name.nil?
|
|
61
|
-
raise "NO tag. pls use -s tag=xxx set tag_name"
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
|
|
65
59
|
system "cd #{local_gitrepo}; git checkout #{branch}; git fetch; git merge origin/#{branch};"
|
|
66
60
|
|
|
67
61
|
|
|
@@ -78,7 +72,15 @@ Capistrano::Configuration.instance(true).load do |configuration|
|
|
|
78
72
|
end
|
|
79
73
|
end
|
|
80
74
|
|
|
81
|
-
|
|
75
|
+
tag_name = configuration[:tag] || configuration[:build_version]
|
|
76
|
+
if tag_name.nil?
|
|
77
|
+
build_msg = war_name.empty? ? "all" : war_name
|
|
78
|
+
system "cd #{local_gitrepo}; git add .; git commit -m 'build for #{build_msg}'"
|
|
79
|
+
# raise "NO tag. pls use -s tag=xxx set tag_name"
|
|
80
|
+
else
|
|
81
|
+
system "cd #{local_gitrepo}; git add .; git commit -m 'tag with #{tag_name}'; git tag #{tag_name};"
|
|
82
|
+
end
|
|
83
|
+
|
|
82
84
|
|
|
83
85
|
# push tags and latest code
|
|
84
86
|
system "cd #{local_gitrepo}; git push origin #{branch}"
|
|
@@ -115,6 +117,11 @@ Capistrano::Configuration.instance(true).load do |configuration|
|
|
|
115
117
|
|
|
116
118
|
|
|
117
119
|
def self.update_repository_local_command(name, war)
|
|
120
|
+
unless war.start_with?('/')
|
|
121
|
+
war_path = "#{local_base_dir}/#{war}"
|
|
122
|
+
else
|
|
123
|
+
war_path = war
|
|
124
|
+
end
|
|
118
125
|
[
|
|
119
126
|
"cd #{local_gitrepo}",
|
|
120
127
|
"if [ -e #{local_gitrepo}/#{name} ]",
|
|
@@ -122,7 +129,7 @@ Capistrano::Configuration.instance(true).load do |configuration|
|
|
|
122
129
|
"fi",
|
|
123
130
|
"mkdir -p #{local_gitrepo}/#{name}",
|
|
124
131
|
"cd #{local_gitrepo}/#{name}",
|
|
125
|
-
"jar -xf #{
|
|
132
|
+
"jar -xf #{war_path}"
|
|
126
133
|
].join("; ")
|
|
127
134
|
end
|
|
128
135
|
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 4
|
|
8
|
-
-
|
|
9
|
-
version: 0.4.
|
|
8
|
+
- 13
|
|
9
|
+
version: 0.4.13
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- crazycode
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2011-
|
|
17
|
+
date: 2011-09-01 00:00:00 +08:00
|
|
18
18
|
default_executable: cap-recipes
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|