crazycode-cap-recipes 0.3.39 → 0.3.39.1

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 3
4
- :build:
4
+ :build: 1
5
5
  :patch: 39
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{crazycode-cap-recipes}
8
- s.version = "0.3.39"
8
+ s.version = "0.3.39.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["crazycode"]
@@ -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}/local_gitrepo"
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 -Rf #{local_gitrepo}/#{name}",
115
+ "then git rm -rf #{local_gitrepo}/#{name}",
115
116
  "fi",
116
117
  "mkdir -p #{local_gitrepo}/#{name}",
117
118
  "cd #{local_gitrepo}/#{name}",
metadata CHANGED
@@ -6,7 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 3
8
8
  - 39
9
- version: 0.3.39
9
+ - 1
10
+ version: 0.3.39.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - crazycode