cap-git-tags 0.1.3 → 0.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c48a1ceb5da338c024b8af6280a20afa3f3f3214
4
- data.tar.gz: 3ee5df58e7786c4b2eba1c17832c8c29dc60e534
3
+ metadata.gz: 5c9c34b9376c8b534f13f6fdc91c69cd3b25eefa
4
+ data.tar.gz: d3208625957567aad8c0ca73e524ead389bc344f
5
5
  SHA512:
6
- metadata.gz: 38034e357065282f6935dc7c8e16759d7b3caa61fcfe0cdee0ddd91e1ac8f006ee4ae26395d9f78ba2ffe32e11fec6871d60fb94d618fde339f1f47d33b552a8
7
- data.tar.gz: 21ab7010494928e43ab5ebf5d7da6c941ac9b9a0ac7befcdaddac9171b0e49ced8141af82cacfcf2e5c350c4eaef52f52c064b2490026565913b7823f54234f5
6
+ metadata.gz: f99ea2c948a99221f1bdf94ddad5a16905aa90dc61d0d4d2ad5626b6d979814e9306f24b383d5554639641e94dc386285b806a4613f2b051bb70e8ac217c5345
7
+ data.tar.gz: ebbc57b5ca1ba7e0af60bfe9d81b3027faed432ccde6e5d52f4d11a02eb32e969e1558ab3da5b79d1b2e04a142cee5054af95ba3aca42a8616386ef515b92030
data/README.md CHANGED
@@ -15,7 +15,7 @@ gem 'cap-git-tags'
15
15
  In your *Capfile*:
16
16
 
17
17
  ```ruby
18
- require 'cap-git-tags'
18
+ require 'capistrano/git-tags'
19
19
  ```
20
20
 
21
21
  * * *
data/cap-git-tags.gemspec CHANGED
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'cap-git-tags/version'
4
+ require 'capistrano/git-tags/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "cap-git-tags"
8
- spec.version = CapGitTags::VERSION
8
+ spec.version = Capistrano::GitTags::VERSION
9
9
  spec.authors = ["Pete Hawkins", "Adrian Dugan"]
10
10
  spec.email = ["pete@phawk.co.uk", "rant@dugg.ie"]
11
11
  spec.description = %q{This is a capistrano 3 plugin for auto tagging your git deploys.}
File without changes
@@ -0,0 +1,5 @@
1
+ module Capistrano
2
+ module GitTags
3
+ VERSION = "0.2.0"
4
+ end
5
+ end
@@ -0,0 +1,28 @@
1
+ # Ensure deploy tasks are loaded before we run
2
+ require 'capistrano/deploy'
3
+
4
+ # Load extra tasks into the deploy namespace
5
+ load File.expand_path("../tasks/git_tags.rake", __FILE__)
6
+
7
+ module Capistrano
8
+ module GitTags
9
+ class Helper
10
+
11
+ def self.git(cmd)
12
+ `git #{cmd} 2>&1`.chomp
13
+ end
14
+
15
+ def self.publish_tag(tag_name)
16
+ git "tag -a #{tag_name} -m \"Auto created deploy tag\""
17
+ git "push origin --tags"
18
+
19
+ "#{tag_name}"
20
+ end
21
+
22
+ def self.current_branch
23
+ git "rev-parse --abbrev-ref HEAD"
24
+ end
25
+
26
+ end
27
+ end
28
+ end
@@ -24,7 +24,7 @@ namespace :gittags do
24
24
 
25
25
  unless ENV['TAG']
26
26
  info "Publishing tag: #{production_tag}"
27
- CapGitTags::Helper.publish_tag production_tag
27
+ Capistrano::GitTags::Helper.publish_tag production_tag
28
28
  end
29
29
 
30
30
  set :branch, production_tag
@@ -38,14 +38,14 @@ namespace :gittags do
38
38
  staging_tag = "staging-#{time.year}-#{time.month}-#{time.day}-#{time.hour}-#{time.min}-#{safe_tag}"
39
39
 
40
40
  info "Publishing tag: #{staging_tag}"
41
- CapGitTags::Helper.publish_tag staging_tag
41
+ Capistrano::GitTags::Helper.publish_tag staging_tag
42
42
 
43
43
  info "Deploying: #{staging_tag} to staging"
44
44
  set :branch, staging_tag
45
45
  else
46
46
  # dev environments allow any branch to be pushed and don't create a tag
47
47
  info "About to deploy your current branch, enter a different branch name to override"
48
- ask :branch, proc { CapGitTags::Helper.current_branch }
48
+ ask :branch, proc { Capistrano::GitTags::Helper.current_branch }
49
49
  end
50
50
  end
51
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cap-git-tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Hawkins
@@ -54,9 +54,10 @@ files:
54
54
  - Rakefile
55
55
  - cap-git-tags.gemspec
56
56
  - changelog.md
57
- - lib/cap-git-tags.rb
58
- - lib/cap-git-tags/tasks/git_tags.rake
59
- - lib/cap-git-tags/version.rb
57
+ - lib/capistrano/git-tags.rb
58
+ - lib/capistrano/git-tags/configuration.rb
59
+ - lib/capistrano/git-tags/version.rb
60
+ - lib/capistrano/tasks/git_tags.rake
60
61
  homepage: https://github.com/phawk/cap-git-tags
61
62
  licenses:
62
63
  - MIT
@@ -1,3 +0,0 @@
1
- module CapGitTags
2
- VERSION = "0.1.3"
3
- end
data/lib/cap-git-tags.rb DELETED
@@ -1,26 +0,0 @@
1
- # Ensure deploy tasks are loaded before we run
2
- require 'capistrano/deploy'
3
-
4
- # Load extra tasks into the deploy namespace
5
- load File.expand_path("../cap-git-tags/tasks/git_tags.rake", __FILE__)
6
-
7
- module CapGitTags
8
- class Helper
9
-
10
- def self.git(cmd)
11
- `git #{cmd} 2>&1`.chomp
12
- end
13
-
14
- def self.publish_tag(tag_name)
15
- git "tag -a #{tag_name} -m \"Auto created deploy tag\""
16
- git "push origin --tags"
17
-
18
- "#{tag_name}"
19
- end
20
-
21
- def self.current_branch
22
- git "rev-parse --abbrev-ref HEAD"
23
- end
24
-
25
- end
26
- end