zorros-deploy 0.0.2 → 0.0.3
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/History.md +7 -0
- data/LICENSE.md +21 -0
- data/README.md +26 -0
- data/lib/zorros-deploy/capistrano.rb +3 -2
- data/lib/zorros-deploy/version.rb +1 -1
- metadata +6 -4
data/History.md
CHANGED
data/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2011 Zorros
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Zorros-deploy gem
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
That's only a sample gem done to show the Zorros people how to create a small
|
|
5
|
+
gem.
|
|
6
|
+
|
|
7
|
+
It's only purpose is to add a tag to the git repository of a project each time
|
|
8
|
+
it's deployed with capistrano. It heavily follows our way of working so it will
|
|
9
|
+
probably **not fit for you**. But if it does, please, feel free to give us a
|
|
10
|
+
hand with it!
|
|
11
|
+
|
|
12
|
+
## How to use it
|
|
13
|
+
|
|
14
|
+
The gem supposes you've a multistage environment set up. You'll need to include
|
|
15
|
+
it on your `config/deploy/production.rb` file, like that.
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'zorros-deploy/capistrano'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Once you've done it, you'll have a small task on capistrano wich will
|
|
22
|
+
automatically create a git tag with the format `dd-mm-yyyy` each time you
|
|
23
|
+
deploy to production.
|
|
24
|
+
|
|
25
|
+
The tag will be created in your working copy's current branch, so make sure
|
|
26
|
+
you're in the branch/commit you're deploying to tag the right thing.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
require 'git'
|
|
2
2
|
Capistrano::Configuration.instance(:must_exist).load do
|
|
3
3
|
|
|
4
|
-
# Create a
|
|
4
|
+
# Create a tag after updating the code
|
|
5
5
|
after "deploy:update_code", "zorros:tag_release"
|
|
6
|
+
after "deploy:migrations", "zorros:tag_release"
|
|
6
7
|
|
|
7
8
|
namespace :zorros do
|
|
8
9
|
desc "Create a GIT tag on each deploy"
|
|
@@ -18,7 +19,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
|
18
19
|
end
|
|
19
20
|
|
|
20
21
|
git.add_tag tag_name
|
|
21
|
-
git.push
|
|
22
|
+
git.push "origin", "master", true
|
|
22
23
|
end
|
|
23
24
|
end
|
|
24
25
|
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:
|
|
4
|
+
hash: 25
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 3
|
|
10
|
+
version: 0.0.3
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Francisco J. Casas, Zorros
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-09-
|
|
18
|
+
date: 2011-09-29 00:00:00 +02:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
@@ -73,6 +73,8 @@ files:
|
|
|
73
73
|
- .gitignore
|
|
74
74
|
- Gemfile
|
|
75
75
|
- History.md
|
|
76
|
+
- LICENSE.md
|
|
77
|
+
- README.md
|
|
76
78
|
- Rakefile
|
|
77
79
|
- lib/zorros-deploy.rb
|
|
78
80
|
- lib/zorros-deploy/capistrano.rb
|