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 +1 -0
- data/History.md +7 -0
- data/lib/zorros-deploy/capistrano.rb +12 -2
- data/lib/zorros-deploy/version.rb +1 -1
- data/zorros-deploy.gemspec +3 -0
- metadata +32 -3
data/.gitignore
CHANGED
data/History.md
ADDED
@@ -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
|
-
|
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
|
-
|
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
|
data/zorros-deploy.gemspec
CHANGED
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:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
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
|