voxpupuli-release 1.2.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +9 -0
- data/.github/workflows/release.yml +1 -1
- data/.github/workflows/test.yml +3 -2
- data/CHANGELOG.md +33 -0
- data/README.md +11 -2
- data/lib/voxpupuli/release/rake_tasks.rb +127 -4
- data/lib/voxpupuli/release/version.rb +1 -1
- data/voxpupuli-release.gemspec +3 -0
- metadata +21 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 356e4d7747c6128502901299af1fba19e71ea8b81b614d3a78a13b1c3d95be03
|
4
|
+
data.tar.gz: 15cf2e0e733939bc3e296647d8f12563dbbc8eefa674cf3f7cca804e2d69a02a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b216fc76ab233fcc2ee7cdb3cfc37305bf8261485df34b50c09d00035ed336992f3ca038f43a5cee2233717b520b27eb04e87d03b7ff3a01e4465670c3571d98
|
7
|
+
data.tar.gz: 221799d7e7a52e39c9d16fc65087358f49fd140c9635d5a769bf0af6dae9711e967593cd6f2fc4965760eca086121543964cddafd1a367c5e39221123f99a4b4
|
data/.github/dependabot.yml
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
version: 2
|
2
2
|
updates:
|
3
|
+
# raise PRs for gem updates
|
3
4
|
- package-ecosystem: bundler
|
4
5
|
directory: "/"
|
5
6
|
schedule:
|
6
7
|
interval: daily
|
7
8
|
time: "13:00"
|
8
9
|
open-pull-requests-limit: 10
|
10
|
+
|
11
|
+
# Maintain dependencies for GitHub Actions
|
12
|
+
- package-ecosystem: github-actions
|
13
|
+
directory: "/"
|
14
|
+
schedule:
|
15
|
+
interval: daily
|
16
|
+
time: "13:00"
|
17
|
+
open-pull-requests-limit: 10
|
data/.github/workflows/test.yml
CHANGED
@@ -14,14 +14,15 @@ jobs:
|
|
14
14
|
fail-fast: false
|
15
15
|
matrix:
|
16
16
|
ruby:
|
17
|
-
- "2.4"
|
18
17
|
- "2.5"
|
19
18
|
- "2.6"
|
20
19
|
- "2.7"
|
21
20
|
- "3.0"
|
21
|
+
- "3.1"
|
22
|
+
- "3.2"
|
22
23
|
name: Ruby ${{ matrix.ruby }}
|
23
24
|
steps:
|
24
|
-
- uses: actions/checkout@
|
25
|
+
- uses: actions/checkout@v3
|
25
26
|
- name: Install Ruby ${{ matrix.ruby }}
|
26
27
|
uses: ruby/setup-ruby@v1
|
27
28
|
with:
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,39 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [v2.0.0](https://github.com/voxpupuli/voxpupuli-release/tree/v2.0.0) (2023-02-21)
|
6
|
+
|
7
|
+
[Full Changelog](https://github.com/voxpupuli/voxpupuli-release/compare/v1.3.0...v2.0.0)
|
8
|
+
|
9
|
+
**Breaking changes:**
|
10
|
+
|
11
|
+
- Drop Ruby 2.4 support [\#46](https://github.com/voxpupuli/voxpupuli-release/pull/46) ([bastelfreak](https://github.com/bastelfreak))
|
12
|
+
|
13
|
+
**Implemented enhancements:**
|
14
|
+
|
15
|
+
- Rework release preparation tasks [\#44](https://github.com/voxpupuli/voxpupuli-release/pull/44) ([smortex](https://github.com/smortex))
|
16
|
+
- Add Ruby 3.1 to CI matrix [\#43](https://github.com/voxpupuli/voxpupuli-release/pull/43) ([bastelfreak](https://github.com/bastelfreak))
|
17
|
+
|
18
|
+
**Fixed bugs:**
|
19
|
+
|
20
|
+
- README.md: Fix link to LICENSE file [\#42](https://github.com/voxpupuli/voxpupuli-release/pull/42) ([bastelfreak](https://github.com/bastelfreak))
|
21
|
+
|
22
|
+
**Merged pull requests:**
|
23
|
+
|
24
|
+
- dependabot: check for github actions as well [\#49](https://github.com/voxpupuli/voxpupuli-release/pull/49) ([bastelfreak](https://github.com/bastelfreak))
|
25
|
+
- Add Ruby 3.2 to CI matrix [\#48](https://github.com/voxpupuli/voxpupuli-release/pull/48) ([bastelfreak](https://github.com/bastelfreak))
|
26
|
+
- Replace `Depreciated` with `Deprecated` [\#47](https://github.com/voxpupuli/voxpupuli-release/pull/47) ([alexjfisher](https://github.com/alexjfisher))
|
27
|
+
- Add Test badge [\#45](https://github.com/voxpupuli/voxpupuli-release/pull/45) ([bastelfreak](https://github.com/bastelfreak))
|
28
|
+
|
29
|
+
## [v1.3.0](https://github.com/voxpupuli/voxpupuli-release/tree/v1.3.0) (2021-12-08)
|
30
|
+
|
31
|
+
[Full Changelog](https://github.com/voxpupuli/voxpupuli-release/compare/v1.2.1...v1.3.0)
|
32
|
+
|
33
|
+
**Implemented enhancements:**
|
34
|
+
|
35
|
+
- Allow no 'v' in release version [\#41](https://github.com/voxpupuli/voxpupuli-release/pull/41) ([smortex](https://github.com/smortex))
|
36
|
+
- Validate REFERENCE.md if it exists [\#39](https://github.com/voxpupuli/voxpupuli-release/pull/39) ([bastelfreak](https://github.com/bastelfreak))
|
37
|
+
|
5
38
|
## [v1.2.1](https://github.com/voxpupuli/voxpupuli-release/tree/v1.2.1) (2021-10-29)
|
6
39
|
|
7
40
|
[Full Changelog](https://github.com/voxpupuli/voxpupuli-release/compare/v1.2.0...v1.2.1)
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# Vox Pupuli Release Gem
|
2
2
|
|
3
|
-
[![License](https://img.shields.io/github/license/voxpupuli/voxpupuli-release.svg)](https://github.com/voxpupuli/voxpupuli-
|
3
|
+
[![License](https://img.shields.io/github/license/voxpupuli/voxpupuli-release.svg)](https://github.com/voxpupuli/voxpupuli-release/blob/master/LICENSE)
|
4
4
|
[![Release](https://github.com/voxpupuli/voxpupuli-release/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/voxpupuli-release/actions/workflows/release.yml)
|
5
|
+
[![Test](https://github.com/voxpupuli/voxpupuli-release/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/voxpupuli-release/actions/workflows/test.yml)
|
5
6
|
[![RubyGem Version](https://img.shields.io/gem/v/voxpupuli-release.svg)](https://rubygems.org/gems/voxpupuli-release)
|
6
7
|
[![RubyGem Downloads](https://img.shields.io/gem/dt/voxpupuli-release.svg)](https://rubygems.org/gems/voxpupuli-release)
|
7
8
|
|
@@ -21,12 +22,20 @@ Then, at the top of your `Rakefile`, add:
|
|
21
22
|
require 'voxpupuli-release'
|
22
23
|
```
|
23
24
|
|
24
|
-
To cut a new release of your module, ensure the `metadata.json` reflects the
|
25
|
+
To cut a new release of your module, ensure the `metadata.json` reflects the expected new version of the module, that no tag exists with that version number (format `v#.#.#`), and then update the module `CHANGELOG.md` and `REFERENCE.md` by running:
|
26
|
+
|
27
|
+
```plain
|
28
|
+
bundle exec rake release:prepare
|
29
|
+
```
|
30
|
+
|
31
|
+
Commit these changes (likely in a new branch, open a Pull-Request and wait for it to be reviewed and merged). When ready to ship the new release, ensure you are on the main branch, it is up-to-date, and run:
|
25
32
|
|
26
33
|
```plain
|
27
34
|
bundle exec rake release
|
28
35
|
```
|
29
36
|
|
37
|
+
This will perform some sanity checks, tag the current commit with the version number, and bump the version number to ensure no conflict will happen by mistake.
|
38
|
+
|
30
39
|
## License
|
31
40
|
|
32
41
|
This gem is licensed under the Apache-2 license.
|
@@ -1,5 +1,46 @@
|
|
1
1
|
require 'puppet_blacksmith/rake_tasks'
|
2
2
|
|
3
|
+
class GCGConfig
|
4
|
+
def self.user=(user)
|
5
|
+
@user = user
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.user
|
9
|
+
@user || project.split(%r{[-/]}).first
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.project=(project)
|
13
|
+
@project = project
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.project
|
17
|
+
@project || metadata['name']
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.metadata
|
21
|
+
require 'puppet_blacksmith'
|
22
|
+
@metadata ||= Blacksmith::Modulefile.new.metadata
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.tag_pattern=(tag_pattern)
|
26
|
+
@tag_pattern = tag_pattern
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.tag_pattern
|
30
|
+
@tag_pattern || 'v%s'
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.future_release
|
34
|
+
if metadata['version'].match?(/^\d+\.\d+.\d+$/)
|
35
|
+
format(tag_pattern, metadata['version'])
|
36
|
+
else
|
37
|
+
# Not formatted like a release, might be a pre-release and the future
|
38
|
+
# changes should better be under an "unreleased" section.
|
39
|
+
nil
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
3
44
|
desc 'Release via GitHub Actions'
|
4
45
|
task :release do
|
5
46
|
Blacksmith::RakeTask.new do |t|
|
@@ -12,8 +53,10 @@ task :release do
|
|
12
53
|
m = Blacksmith::Modulefile.new
|
13
54
|
v = m.version
|
14
55
|
raise "Refusing to release an RC or build-release (#{v}).\n" +
|
15
|
-
"Please set a semver *release* version." unless v
|
56
|
+
"Please set a semver *release* version." unless v.match?(/^\d+\.\d+.\d+$/)
|
16
57
|
|
58
|
+
# validate that the REFERENCE.md is up2date, if it exists
|
59
|
+
Rake::Task['strings:validate:reference'].invoke if File.exist?('REFERENCE.md')
|
17
60
|
Rake::Task[:check_changelog].invoke
|
18
61
|
# do a "manual" module:release (clean, tag, bump, commit, push tags)
|
19
62
|
Rake::Task["module:clean"].invoke
|
@@ -32,9 +75,9 @@ task :release do
|
|
32
75
|
g.push!
|
33
76
|
end
|
34
77
|
|
35
|
-
desc '
|
78
|
+
desc 'Deprecated: use the "release" task instead'
|
36
79
|
task "travis_release" do
|
37
|
-
STDERR.puts "
|
80
|
+
STDERR.puts "Deprecated: use the 'release' task instead"
|
38
81
|
Rake::Task['release'].invoke
|
39
82
|
end
|
40
83
|
|
@@ -45,7 +88,87 @@ task :check_changelog do
|
|
45
88
|
#
|
46
89
|
# ## 2016-11-20 Release 4.0.2
|
47
90
|
# ## [v4.0.3-rc0](https://github.com/voxpupuli/puppet-r10k/tree/v4.0.3-rc0) (2016-12-13)
|
48
|
-
|
91
|
+
# ## [2.1.0](https://github.com/opus-codium/puppet-odoo/tree/2.1.0) (2021-12-02)
|
92
|
+
if File.readlines('CHANGELOG.md').grep( /^(#.+[Rr]eleas.+#{Regexp.escape(v)}|## \[v?#{Regexp.escape(v)}\])/ ).empty?
|
49
93
|
fail "Unable to find a CHANGELOG.md entry for the #{v} release."
|
50
94
|
end
|
51
95
|
end
|
96
|
+
|
97
|
+
namespace :release do
|
98
|
+
desc "Prepare a release"
|
99
|
+
task prepare: ['release:porcelain:changelog'] do
|
100
|
+
v = Blacksmith::Modulefile.new.version
|
101
|
+
Rake::Task["strings:generate:reference"].invoke if File.exist?('REFERENCE.md')
|
102
|
+
puts <<~MESSAGE
|
103
|
+
|
104
|
+
Please review these changes and commit them to a new branch:
|
105
|
+
|
106
|
+
git checkout -b release-#{v}
|
107
|
+
git commit -m "Release #{v}"
|
108
|
+
|
109
|
+
Then open a Pull-Request and wait for it to be reviewed and merged).
|
110
|
+
MESSAGE
|
111
|
+
end
|
112
|
+
|
113
|
+
namespace :porcelain do
|
114
|
+
begin
|
115
|
+
require 'github_changelog_generator/task'
|
116
|
+
rescue LoadError
|
117
|
+
desc "Dummy"
|
118
|
+
task :changelog do
|
119
|
+
puts "Skipping CHANGELOG.md generation. Ensure github_changelog_generator is present if you expected it to be generated."
|
120
|
+
end
|
121
|
+
else
|
122
|
+
task :changelog do
|
123
|
+
# This is taken from lib/github_changelog_generator/task
|
124
|
+
# The generator cannot be used because we want to lazyly evaluate
|
125
|
+
# GCGConfig.user which might be overrider in the module Rakefile.
|
126
|
+
options = GitHubChangelogGenerator::Parser.default_options
|
127
|
+
options[:user] = GCGConfig.user
|
128
|
+
options[:project] = GCGConfig.project
|
129
|
+
options[:future_release] = GCGConfig.future_release
|
130
|
+
options[:header] = <<~HEADER.chomp
|
131
|
+
# Changelog
|
132
|
+
|
133
|
+
All notable changes to this project will be documented in this file.
|
134
|
+
Each new release typically also includes the latest modulesync defaults.
|
135
|
+
These should not affect the functionality of the module.
|
136
|
+
HEADER
|
137
|
+
options[:exclude_labels] = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog}
|
138
|
+
generator = GitHubChangelogGenerator::Generator.new(options)
|
139
|
+
log = generator.compound_changelog
|
140
|
+
output_filename = options[:output].to_s
|
141
|
+
|
142
|
+
# Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
|
143
|
+
require 'rbconfig'
|
144
|
+
unless RbConfig::CONFIG['host_os'].match?(/windows/)
|
145
|
+
puts 'Fixing line endings...'
|
146
|
+
log.gsub!("\r\n", "\n")
|
147
|
+
end
|
148
|
+
|
149
|
+
File.write(output_filename, log)
|
150
|
+
puts "Generated log placed in #{File.absolute_path(output_filename)}"
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
# For backward compatibility
|
157
|
+
task :changelog do
|
158
|
+
fail <<-ERROR
|
159
|
+
The "changelog" task is deprecated.
|
160
|
+
|
161
|
+
Prefer "release:prepare" which manage all pre-release steps, or directly run
|
162
|
+
the "release:porcelain:changelog" task.
|
163
|
+
ERROR
|
164
|
+
end
|
165
|
+
|
166
|
+
# For backward compatibility
|
167
|
+
task :reference do
|
168
|
+
fail <<-ERROR
|
169
|
+
The "reference" task is deprecated.
|
170
|
+
|
171
|
+
Prefer "release:prepare" which manage all pre-release steps, or directly run
|
172
|
+
the "strings:generate:reference" task.
|
173
|
+
ERROR
|
174
|
+
end
|
data/voxpupuli-release.gemspec
CHANGED
@@ -12,6 +12,8 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.description = s.summary
|
13
13
|
s.licenses = 'Apache-2.0'
|
14
14
|
|
15
|
+
s.required_ruby_version = '>= 2.5', '< 4'
|
16
|
+
|
15
17
|
s.files = `git ls-files`.split("\n")
|
16
18
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
@@ -19,4 +21,5 @@ Gem::Specification.new do |s|
|
|
19
21
|
# Runtime dependencies, but also probably dependencies of requiring projects
|
20
22
|
s.add_runtime_dependency 'rake'
|
21
23
|
s.add_runtime_dependency 'puppet-blacksmith', '>= 4.0.0'
|
24
|
+
s.add_runtime_dependency 'puppet-strings', '>= 2.9.0'
|
22
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voxpupuli-release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 4.0.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: puppet-strings
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.9.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.9.0
|
41
55
|
description: Helpers for deploying Vox Pupuli modules
|
42
56
|
email:
|
43
57
|
- voxpupuli@groups.io
|
@@ -71,14 +85,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
71
85
|
requirements:
|
72
86
|
- - ">="
|
73
87
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
88
|
+
version: '2.5'
|
89
|
+
- - "<"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '4'
|
75
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
93
|
requirements:
|
77
94
|
- - ">="
|
78
95
|
- !ruby/object:Gem::Version
|
79
96
|
version: '0'
|
80
97
|
requirements: []
|
81
|
-
rubygems_version: 3.2.
|
98
|
+
rubygems_version: 3.2.33
|
82
99
|
signing_key:
|
83
100
|
specification_version: 4
|
84
101
|
summary: Helpers for deploying Vox Pupuli modules
|