cookbook-release 2.0.1 → 2.0.2
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 +4 -4
- data/README.md +2 -2
- data/cookbook-release.gemspec +1 -1
- data/lib/cookbook-release/rake_tasks.rb +107 -0
- data/lib/cookbook-release/release.rb +4 -0
- data/lib/cookbook-release.rb +1 -105
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 401f2dff87d778073ac223de55afb29e6aab7559a9864a8b6109e10026223f7d
|
|
4
|
+
data.tar.gz: fbdba293a7a91946690eb7536f632fe66327f38b875a2c887d1369d403c0fda1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1150bb9411bca0d001e3c77c261a67a7839d4751ec395d69abac3b5cc97f2aea606f2f8d9b3956828a07e7420efa87d4d632f13e17c8526d8ed04b97cbf72577
|
|
7
|
+
data.tar.gz: 7629f75dde90292635992a67d5028a8daef064eddb6e987291824b5c0e1d54941e5f9d4efe855b03bee4935ff4f435313fd6204204ae53bbf662aca0ac4abea5
|
data/README.md
CHANGED
|
@@ -44,7 +44,7 @@ version ::CookbookRelease::Release.current_version(__FILE__)
|
|
|
44
44
|
Include the rake tasks in your Rakefile:
|
|
45
45
|
|
|
46
46
|
```
|
|
47
|
-
require 'cookbook-release'
|
|
47
|
+
require 'cookbook-release/rake_tasks'
|
|
48
48
|
CookbookRelease::Rake::CookbookTask.new
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -74,7 +74,7 @@ Changelog generation for chef-repositories
|
|
|
74
74
|
|
|
75
75
|
Using:
|
|
76
76
|
```
|
|
77
|
-
require 'cookbook-release'
|
|
77
|
+
require 'cookbook-release/rake_tasks'
|
|
78
78
|
CookbookRelease::Rake::RepoTask.new
|
|
79
79
|
```
|
|
80
80
|
|
data/cookbook-release.gemspec
CHANGED
|
@@ -6,7 +6,7 @@ require 'English'
|
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |spec|
|
|
8
8
|
spec.name = 'cookbook-release'
|
|
9
|
-
spec.version = '2.0.
|
|
9
|
+
spec.version = '2.0.2'
|
|
10
10
|
spec.authors = ['Grégoire Seux']
|
|
11
11
|
spec.email = 'g.seux@criteo.com'
|
|
12
12
|
spec.summary = 'Provide primitives (and rake tasks) to release a cookbook'
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
require 'rake'
|
|
2
|
+
require 'rake/tasklib'
|
|
3
|
+
require_relative 'changelog'
|
|
4
|
+
require_relative 'git-utilities'
|
|
5
|
+
require_relative 'release'
|
|
6
|
+
|
|
7
|
+
module CookbookRelease
|
|
8
|
+
module Rake
|
|
9
|
+
|
|
10
|
+
class RepoTask < ::Rake::TaskLib
|
|
11
|
+
def initialize(opts = {}, &html_block)
|
|
12
|
+
desc 'Display raw changelog between branches'
|
|
13
|
+
task 'changelog:raw', [:sub_dir] do |_, args|
|
|
14
|
+
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
15
|
+
puts Changelog.new(git, opts).raw
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
desc 'Display raw changelog between branches with risky commits on top'
|
|
19
|
+
task 'changelog:raw_priority', [:sub_dir] do |_, args|
|
|
20
|
+
git = GitUtilities.new(args)
|
|
21
|
+
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
22
|
+
puts Changelog.new(git, opts).raw_priority
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
desc 'Display html changelog between branches'
|
|
26
|
+
task 'changelog:html', [:sub_dir] do |_, args|
|
|
27
|
+
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
28
|
+
html = Changelog.new(git, opts).html
|
|
29
|
+
if block_given?
|
|
30
|
+
html = html_block.call(html)
|
|
31
|
+
end
|
|
32
|
+
puts html
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
desc 'Display html changelog between branches with risky commits on top'
|
|
36
|
+
task 'changelog:html_priority', [:sub_dir] do |_, args|
|
|
37
|
+
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
38
|
+
html = Changelog.new(git, opts).html_priority
|
|
39
|
+
if block_given?
|
|
40
|
+
html = html_block.call(html)
|
|
41
|
+
end
|
|
42
|
+
puts html
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
desc 'Display markdown changelog between branches'
|
|
46
|
+
task 'changelog:markdown', [:sub_dir] do |_, args|
|
|
47
|
+
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
48
|
+
puts Changelog.new(git, opts).markdown
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
desc 'Display markdown changelog between branches with risky commits on top'
|
|
52
|
+
task 'changelog:markdown_priority', [:sub_dir] do |_, args|
|
|
53
|
+
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
54
|
+
puts Changelog.new(git, opts).markdown_priority
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
desc 'Display markdown changelog between branches with risky commits on top and non-node-only changes separated'
|
|
58
|
+
task 'changelog:markdown_priority_nodes', [:sub_dir] do |_, args|
|
|
59
|
+
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
60
|
+
puts Changelog.new(git, opts).markdown_priority_nodes
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
class CookbookTask < ::Rake::TaskLib
|
|
66
|
+
|
|
67
|
+
def initialize(namespaced=false)
|
|
68
|
+
define_tasks(namespaced)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def define_tasks(namespaced)
|
|
72
|
+
|
|
73
|
+
desc 'Prepare cookbook release and push tag to git'
|
|
74
|
+
task 'release!' do
|
|
75
|
+
opts = {
|
|
76
|
+
no_prompt: ENV['NO_PROMPT'],
|
|
77
|
+
category: ENV['COOKBOOK_CATEGORY'],
|
|
78
|
+
skip_upload: ENV['SKIP_COOKOOK_UPLOAD']
|
|
79
|
+
}
|
|
80
|
+
git = GitUtilities.new
|
|
81
|
+
Release.new(git, opts).release!
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
desc 'Suggest new release version'
|
|
85
|
+
task 'release:suggest_version' do
|
|
86
|
+
git = GitUtilities.new
|
|
87
|
+
release = Release.new(git)
|
|
88
|
+
release.display_suggested_version(*release.new_version)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
desc 'Display last released version'
|
|
92
|
+
task 'release:version' do
|
|
93
|
+
git = GitUtilities.new
|
|
94
|
+
release = Release.new(git)
|
|
95
|
+
puts release.last_release
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
desc 'Display changelog since last release'
|
|
99
|
+
task 'release:changelog' do
|
|
100
|
+
git = GitUtilities.new
|
|
101
|
+
release = Release.new(git)
|
|
102
|
+
release.display_changelog(release.new_version.first)
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
data/lib/cookbook-release.rb
CHANGED
|
@@ -3,108 +3,4 @@ require_relative 'cookbook-release/git-utilities'
|
|
|
3
3
|
require_relative 'cookbook-release/supermarket'
|
|
4
4
|
require_relative 'cookbook-release/release'
|
|
5
5
|
require_relative 'cookbook-release/changelog'
|
|
6
|
-
|
|
7
|
-
require 'rake'
|
|
8
|
-
require 'rake/tasklib'
|
|
9
|
-
|
|
10
|
-
module CookbookRelease
|
|
11
|
-
module Rake
|
|
12
|
-
|
|
13
|
-
class RepoTask < ::Rake::TaskLib
|
|
14
|
-
def initialize(opts = {}, &html_block)
|
|
15
|
-
desc 'Display raw changelog between branches'
|
|
16
|
-
task 'changelog:raw', [:sub_dir] do |_, args|
|
|
17
|
-
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
18
|
-
puts Changelog.new(git, opts).raw
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
desc 'Display raw changelog between branches with risky commits on top'
|
|
22
|
-
task 'changelog:raw_priority', [:sub_dir] do |_, args|
|
|
23
|
-
git = GitUtilities.new(args)
|
|
24
|
-
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
25
|
-
puts Changelog.new(git, opts).raw_priority
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
desc 'Display html changelog between branches'
|
|
29
|
-
task 'changelog:html', [:sub_dir] do |_, args|
|
|
30
|
-
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
31
|
-
html = Changelog.new(git, opts).html
|
|
32
|
-
if block_given?
|
|
33
|
-
html = html_block.call(html)
|
|
34
|
-
end
|
|
35
|
-
puts html
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
desc 'Display html changelog between branches with risky commits on top'
|
|
39
|
-
task 'changelog:html_priority', [:sub_dir] do |_, args|
|
|
40
|
-
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
41
|
-
html = Changelog.new(git, opts).html_priority
|
|
42
|
-
if block_given?
|
|
43
|
-
html = html_block.call(html)
|
|
44
|
-
end
|
|
45
|
-
puts html
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
desc 'Display markdown changelog between branches'
|
|
49
|
-
task 'changelog:markdown', [:sub_dir] do |_, args|
|
|
50
|
-
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
51
|
-
puts Changelog.new(git, opts).markdown
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
desc 'Display markdown changelog between branches with risky commits on top'
|
|
55
|
-
task 'changelog:markdown_priority', [:sub_dir] do |_, args|
|
|
56
|
-
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
57
|
-
puts Changelog.new(git, opts).markdown_priority
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
desc 'Display markdown changelog between branches with risky commits on top and non-node-only changes separated'
|
|
61
|
-
task 'changelog:markdown_priority_nodes', [:sub_dir] do |_, args|
|
|
62
|
-
git = GitUtilities.new('sub_dir': args['sub_dir'])
|
|
63
|
-
puts Changelog.new(git, opts).markdown_priority_nodes
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
class CookbookTask < ::Rake::TaskLib
|
|
69
|
-
|
|
70
|
-
def initialize(namespaced=false)
|
|
71
|
-
define_tasks(namespaced)
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
def define_tasks(namespaced)
|
|
75
|
-
|
|
76
|
-
desc 'Prepare cookbook release and push tag to git'
|
|
77
|
-
task 'release!' do
|
|
78
|
-
opts = {
|
|
79
|
-
no_prompt: ENV['NO_PROMPT'],
|
|
80
|
-
category: ENV['COOKBOOK_CATEGORY'],
|
|
81
|
-
skip_upload: ENV['SKIP_COOKOOK_UPLOAD']
|
|
82
|
-
}
|
|
83
|
-
git = GitUtilities.new
|
|
84
|
-
Release.new(git, opts).release!
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
desc 'Suggest new release version'
|
|
88
|
-
task 'release:suggest_version' do
|
|
89
|
-
git = GitUtilities.new
|
|
90
|
-
release = Release.new(git)
|
|
91
|
-
release.display_suggested_version(*release.new_version)
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
desc 'Display last released version'
|
|
95
|
-
task 'release:version' do
|
|
96
|
-
git = GitUtilities.new
|
|
97
|
-
release = Release.new(git)
|
|
98
|
-
puts release.last_release
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
desc 'Display changelog since last release'
|
|
102
|
-
task 'release:changelog' do
|
|
103
|
-
git = GitUtilities.new
|
|
104
|
-
release = Release.new(git)
|
|
105
|
-
release.display_changelog(release.new_version.first)
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
end
|
|
109
|
-
end
|
|
110
|
-
end
|
|
6
|
+
require_relative 'cookbook-release/rake_tasks'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cookbook-release
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Grégoire Seux
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: semantic
|
|
@@ -182,6 +182,7 @@ files:
|
|
|
182
182
|
- lib/cookbook-release/changelog.rb
|
|
183
183
|
- lib/cookbook-release/commit.rb
|
|
184
184
|
- lib/cookbook-release/git-utilities.rb
|
|
185
|
+
- lib/cookbook-release/rake_tasks.rb
|
|
185
186
|
- lib/cookbook-release/release.rb
|
|
186
187
|
- lib/cookbook-release/supermarket.rb
|
|
187
188
|
- spec/changelog_spec.rb
|