codebase4 1.0.2 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -52,7 +52,7 @@ module Codebase
52
52
 
53
53
  puts "Sending deployment information to #{host} (project: '#{project}' repo: '#{repo}')"
54
54
 
55
- puts " Commits......: #{hash[:end_ref]} ... #{hash[:start_ref]}"
55
+ puts " Commits......: #{hash[:start_ref]} ... #{hash[:end_ref]}"
56
56
  puts " Environment..: #{hash[:environment] || '-'}"
57
57
  puts " Branch.......: #{hash[:branch] || '-'}"
58
58
  puts " Server(s)....: #{hash[:servers]}"
@@ -0,0 +1,36 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+
3
+ after 'deploy:symlink', 'codebase:log_deployment'
4
+
5
+ namespace :codebase do
6
+ desc "Logs the deployment of your Codebase 4 repository"
7
+ task :log_deployment do
8
+
9
+ if previous_revision == current_revision
10
+ puts "\e[31m The old revision & new revision are the same - you didn't deploy anything new. Skipping logging.\e[0m"
11
+ next
12
+ end
13
+
14
+ cmd = ["cb deploy #{previous_revision} #{current_revision}"]
15
+
16
+ cmd << "-s #{roles.values.collect{|r| r.servers}.flatten.collect{|s| s.host}.uniq.join(',') rescue ''}"
17
+ cmd << "-b #{fetch(:branch)}"
18
+ #cmd << "-e #{fetch(:environment)}"
19
+
20
+ ## get the repo and project name etc...
21
+ if fetch(:repository) =~ /git\@codebasehq.com\:(.+)\/(.+)\/(.+)\.git\z/
22
+ account, project, repo = $1, $2, $3
23
+ cmd << "-r #{project}:#{repo}"
24
+ cmd << "-h #{account}.codebasehq.com"
25
+ cmd << "--protocol https"
26
+ else
27
+ puts "! Repository path not supported by deployment logging"
28
+ next
29
+ end
30
+ puts " running: #{cmd.join(' ')}"
31
+ system(cmd.join(' ') + "; true")
32
+
33
+ end
34
+ end
35
+
36
+ end
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codebase4
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease: false
6
- segments:
7
- - 1
8
- - 0
9
- - 2
10
- version: 1.0.2
4
+ prerelease:
5
+ version: 1.0.7
11
6
  platform: ruby
12
7
  authors:
13
8
  - Adam Cooke
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-03-07 00:00:00 +00:00
13
+ date: 2011-07-15 00:00:00 +01:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
@@ -26,11 +21,6 @@ dependencies:
26
21
  requirements:
27
22
  - - ">="
28
23
  - !ruby/object:Gem::Version
29
- hash: 25
30
- segments:
31
- - 1
32
- - 1
33
- - 5
34
24
  version: 1.1.5
35
25
  type: :runtime
36
26
  version_requirements: *id001
@@ -48,6 +38,7 @@ files:
48
38
  - bin/codebase
49
39
  - lib/codebase/cli.rb
50
40
  - lib/codebase/config.rb
41
+ - lib/codebase/recipes.rb
51
42
  - lib/codebase.rb
52
43
  has_rdoc: true
53
44
  homepage: http://atechmedia.com
@@ -63,23 +54,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
54
  requirements:
64
55
  - - ">="
65
56
  - !ruby/object:Gem::Version
66
- hash: 3
67
- segments:
68
- - 0
69
57
  version: "0"
70
58
  required_rubygems_version: !ruby/object:Gem::Requirement
71
59
  none: false
72
60
  requirements:
73
61
  - - ">="
74
62
  - !ruby/object:Gem::Version
75
- hash: 3
76
- segments:
77
- - 0
78
63
  version: "0"
79
64
  requirements: []
80
65
 
81
66
  rubyforge_project:
82
- rubygems_version: 1.3.7
67
+ rubygems_version: 1.5.2
83
68
  signing_key:
84
69
  specification_version: 3
85
70
  summary: The RubyGem for Codebase v4 Deployment Tracking (replaces previous codebase gems)