Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Version 0.0.2

  • Loading branch information...
commit 7f25c2cac5c567bcc0bed6ef3cdc47e13255439a 1 parent 349901d
Leon Berenschot authored

Showing 2 changed files with 25 additions and 25 deletions. Show diff stats Hide diff stats

  1. +1 1  Manifest
  2. +24 24 lib/capistrano/git/tags.rb
2  Manifest
... ... @@ -1,5 +1,5 @@
1 1 CHANGELOG.rdoc
2   -lib/capistrano/git-tags.rb
  2 +lib/capistrano/git/tags.rb
3 3 MIT-LICENSE
4 4 README.markdown
5 5 Manifest
48 lib/capistrano/git/tags.rb
@@ -6,41 +6,41 @@
6 6
7 7 Capistrano::Configuration.instance.load do
8 8
9   - after "deploy:restart", "git:tags:push_deploy_tag"
10   - before "deploy:cleanup", "git:tags:cleanup_deploy_tag"
  9 + after "deploy:restart", "git:tags:push_deploy_tag"
  10 + before "deploy:cleanup", "git:tags:cleanup_deploy_tag"
11 11
12   - namespace :git do
  12 + namespace :git do
13 13
14   - namespace :tags do
  14 + namespace :tags do
15 15
16   - desc "Place release tag into Git and push it to server."
17   - task :push_deploy_tag do
18   - user = `git config --get user.name`
19   - email = `git config --get user.email`
  16 + desc "Place release tag into Git and push it to server."
  17 + task :push_deploy_tag do
  18 + user = `git config --get user.name`
  19 + email = `git config --get user.email`
20 20
21   - puts `git tag #{rails_env}_#{release_name} #{revision} -m "Deployed by #{user} <#{email}>"`
22   - puts `git push --tags`
23   - end
  21 + puts `git tag #{rails_env}_#{release_name} #{revision} -m "Deployed by #{user} <#{email}>"`
  22 + puts `git push --tags`
  23 + end
24 24
25   - desc "Place release tag into Git and push it to server."
26   - task :cleanup_deploy_tag do
27   - count = fetch(:keep_releases, 5).to_i
28   - if count >= releases.length
29   - logger.important "no old release tags to clean up"
30   - else
31   - logger.info "keeping #{count} of #{releases.length} release tags"
  25 + desc "Place release tag into Git and push it to server."
  26 + task :cleanup_deploy_tag do
  27 + count = fetch(:keep_releases, 5).to_i
  28 + if count >= releases.length
  29 + logger.important "no old release tags to clean up"
  30 + else
  31 + logger.info "keeping #{count} of #{releases.length} release tags"
32 32
33   - tags = (releases - releases.last(count)).map { |release| "#{rails_env}_#{release}" }
  33 + tags = (releases - releases.last(count)).map { |release| "#{rails_env}_#{release}" }
34 34
35   - tags.each do |tag|
36   - `git tag -d #{tag}`
37   - `git push origin :refs/tags/#{tag}`
38   - end
  35 + tags.each do |tag|
  36 + `git tag -d #{tag}`
  37 + `git push origin :refs/tags/#{tag}`
39 38 end
40 39 end
41   -
42 40 end
43 41
44 42 end
  43 +
45 44 end
  45 +
46 46 end

0 comments on commit 7f25c2c

Please sign in to comment.
Something went wrong with that request. Please try again.