zorros-deploy 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ .rvmrc
data/History.md ADDED
@@ -0,0 +1,7 @@
1
+
2
+ v.0.0.2 / 2011-09-28
3
+ ==================
4
+
5
+ * Git push after creating the tag
6
+ * Ignored .rvmrc
7
+ * Append tag number if date tag exists
@@ -1,3 +1,4 @@
1
+ require 'git'
1
2
  Capistrano::Configuration.instance(:must_exist).load do
2
3
 
3
4
  # Create a task after updating the code
@@ -6,9 +7,18 @@ Capistrano::Configuration.instance(:must_exist).load do
6
7
  namespace :zorros do
7
8
  desc "Create a GIT tag on each deploy"
8
9
  task :tag_release do
9
- tag_name = Time.now.strftime("deploy_%d-%m-%Y")
10
+ git = Git.open "."
11
+ tag_date = Time.now.strftime("%d-%m-%Y")
12
+ tag_number = git.tags.collect { |t| t.name =~ %r{#{tag_date}} }.compact.size
10
13
 
11
- system "git tag -a -m 'Deployment on #{Time.now.strftime("%d-%m-%Y")}' #{tag_name}"
14
+ tag_name = if tag_number > 0
15
+ "#{tag_date}.#{tag_number}"
16
+ else
17
+ tag_date
18
+ end
19
+
20
+ git.add_tag tag_name
21
+ git.push
12
22
  end
13
23
  end
14
24
  end
@@ -1,5 +1,5 @@
1
1
  module Zorros
2
2
  module Deploy
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -20,4 +20,7 @@ Gem::Specification.new do |s|
20
20
 
21
21
  # specify any dependencies here; for example:
22
22
  s.add_runtime_dependency "capistrano"
23
+ s.add_runtime_dependency "git"
24
+
25
+ s.add_development_dependency "pry"
23
26
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zorros-deploy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Francisco J. Casas, Zorros
@@ -32,6 +32,34 @@ dependencies:
32
32
  version: "0"
33
33
  type: :runtime
34
34
  version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: git
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :runtime
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: pry
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 0
60
+ version: "0"
61
+ type: :development
62
+ version_requirements: *id003
35
63
  description: Some common capistrano tasks for all our applications
36
64
  email:
37
65
  - hello@zorros.be
@@ -44,6 +72,7 @@ extra_rdoc_files: []
44
72
  files:
45
73
  - .gitignore
46
74
  - Gemfile
75
+ - History.md
47
76
  - Rakefile
48
77
  - lib/zorros-deploy.rb
49
78
  - lib/zorros-deploy/capistrano.rb