capistrano-tagging3 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 685a728ec66fc374d87e0caeea60b19aa484547adf6d60d323f74a43f4a7ebc5
4
+ data.tar.gz: aac75462abbd31aa0d7d181dfc93eb21749ef03be0e781b70955eee5266858cd
5
+ SHA512:
6
+ metadata.gz: d7d6b154ccde1fe55e359d0749f0e057dc444d781356bbf9bca1677f074cc2b3d0795bc962e9150a1e173d96ebec9a81bf24972cf18c21bbe241ca133a2adf67
7
+ data.tar.gz: 336206ea3ef62ace2754fcb99f5252ed045183023b0bdb6de1c473bff90579fe1fe667abf80de42d876ff84f77bf074607200c0ca77b12bfca9b80bd09d848df
data/.gitignore CHANGED
@@ -1,2 +1,4 @@
1
1
  .DS_Store
2
2
  *.gem
3
+
4
+ Gemfile.lock
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,11 @@
1
+ == 2.0.0 (May 2022)
2
+
3
+ * Execute before cleanup to support custom deploy tasks - Thanks to Kevin Ellis <kevin.ellis@excella.com>
4
+ * Fix delete of remote tag
5
+ * Add workaround to ensure sequential execution across hosts
6
+ * Don't try and delete the same tag multiple times when that release is being deleted from multiple hosts
7
+
8
+
1
9
  == 1.0.0 (May 2017)
2
10
 
3
11
  * Forked and upgraded to capistrano v3
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  class Tagging3
3
- VERSION = '1.0.0'.freeze
3
+ VERSION = '2.0.0'.freeze
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  namespace :tagging3 do
2
2
  set :tagging3_format, ':rails_env_:release'
3
-
3
+
4
4
  def fetch_or_send(method)
5
5
  fetch method, respond_to?(method) ? send(method) : nil
6
6
  end
@@ -26,8 +26,10 @@ namespace :tagging3 do
26
26
  end
27
27
 
28
28
  def remove_tag(name)
29
- puts `git tag -d #{name}`
30
- puts `git push origin :refs/tags/#{name}`
29
+ #puts "Deleting tag #{name} locally..."
30
+ puts `git tag -d '#{name}'`
31
+ #puts "Deleting tag #{name} from origin..."
32
+ puts `git push origin --delete '#{name}'`
31
33
  end
32
34
 
33
35
  desc "Create release tag in local and origin repo"
@@ -39,7 +41,9 @@ namespace :tagging3 do
39
41
  task :cleanup do
40
42
  count = fetch(:keep_releases, 5).to_i
41
43
  multiple_hosts = false
42
- on roles(:all) do |host|
44
+ # workaround to make sure it is in sequence
45
+ have_removed = { }
46
+ on roles(:all).to_a, in: :sequence do |host|
43
47
  #puts "HOST: #{host.inspect}"
44
48
  releases = capture(:ls, '-xtr', releases_path).split
45
49
 
@@ -48,7 +52,10 @@ namespace :tagging3 do
48
52
  else
49
53
  puts "keeping #{count} of #{releases.size} release tags"
50
54
  releases.first(releases.size - count).map do |release|
55
+ next if have_removed[release]
56
+
51
57
  remove_tag tag(:release => release)
58
+ have_removed[release] = true
52
59
  end
53
60
  end
54
61
  multiple_hosts = true
@@ -56,6 +63,6 @@ namespace :tagging3 do
56
63
  end
57
64
  end
58
65
 
59
- after 'deploy:restart', 'tagging3:deploy'
66
+ before 'tagging3:cleanup', 'tagging3:deploy'
60
67
  before 'deploy:cleanup', 'tagging3:cleanup'
61
68
 
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-tagging3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
5
- prerelease:
4
+ version: 2.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dimko
@@ -11,28 +10,24 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2017-05-11 00:00:00.000000000 Z
13
+ date: 2022-05-15 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: capistrano
18
17
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
- - - ~>
19
+ - - "~>"
22
20
  - !ruby/object:Gem::Version
23
21
  version: '3.0'
24
22
  type: :runtime
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
25
  requirements:
29
- - - ~>
26
+ - - "~>"
30
27
  - !ruby/object:Gem::Version
31
28
  version: '3.0'
32
- description: ! ' Create a tag in the local and remote repo on every deploy with
33
- capistrano v3
34
-
35
- '
29
+ description: " Create a tag in the local and remote repo on every deploy with capistrano
30
+ v3\n"
36
31
  email:
37
32
  - deemox@gmail.com
38
33
  - LeonB@beriedata.nl
@@ -41,10 +36,9 @@ executables: []
41
36
  extensions: []
42
37
  extra_rdoc_files: []
43
38
  files:
44
- - .gitignore
39
+ - ".gitignore"
45
40
  - CHANGELOG.rdoc
46
41
  - Gemfile
47
- - Gemfile.lock
48
42
  - MIT-LICENSE
49
43
  - README.md
50
44
  - Rakefile
@@ -54,26 +48,24 @@ files:
54
48
  - lib/capistrano/tasks/tagging3.rake
55
49
  homepage: http://github.com/ianheggie/capistrano-tagging3
56
50
  licenses: []
51
+ metadata: {}
57
52
  post_install_message:
58
53
  rdoc_options: []
59
54
  require_paths:
60
55
  - lib
61
56
  required_ruby_version: !ruby/object:Gem::Requirement
62
- none: false
63
57
  requirements:
64
- - - ! '>='
58
+ - - ">="
65
59
  - !ruby/object:Gem::Version
66
60
  version: '0'
67
61
  required_rubygems_version: !ruby/object:Gem::Requirement
68
- none: false
69
62
  requirements:
70
- - - ! '>='
63
+ - - ">="
71
64
  - !ruby/object:Gem::Version
72
65
  version: '0'
73
66
  requirements: []
74
- rubyforge_project:
75
- rubygems_version: 1.8.23
67
+ rubygems_version: 3.3.7
76
68
  signing_key:
77
- specification_version: 3
69
+ specification_version: 4
78
70
  summary: Tag your deployed commit to git
79
71
  test_files: []
data/Gemfile.lock DELETED
@@ -1,30 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- capistrano-tagging3 (0.1.0)
5
- capistrano (~> 3.0)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- capistrano (3.4.0)
11
- i18n
12
- rake (>= 10.0.0)
13
- sshkit (~> 1.3)
14
- i18n (0.7.0)
15
- net-scp (1.2.1)
16
- net-ssh (>= 2.6.5)
17
- net-ssh (2.9.4)
18
- rake (10.5.0)
19
- sshkit (1.11.3)
20
- net-scp (>= 1.1.2)
21
- net-ssh (>= 2.8.0)
22
-
23
- PLATFORMS
24
- ruby
25
-
26
- DEPENDENCIES
27
- capistrano-tagging3!
28
-
29
- BUNDLED WITH
30
- 1.14.6