voxpupuli-release 1.3.0 → 3.0.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 +4 -4
- data/.github/dependabot.yml +9 -0
- data/.github/workflows/release.yml +2 -2
- data/.github/workflows/test.yml +24 -5
- data/.rubocop.yml +5 -0
- data/.rubocop_todo.yml +70 -0
- data/CHANGELOG.md +41 -0
- data/Gemfile +2 -1
- data/README.md +11 -2
- data/Rakefile +11 -3
- data/lib/voxpupuli/release/rake_tasks.rb +133 -11
- data/lib/voxpupuli/release/version.rb +1 -1
- data/voxpupuli-release.gemspec +9 -8
- metadata +43 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a7173d35800706490167b9fffd1fa15ef2a65186efc861dba5ee266fa0e42450
|
|
4
|
+
data.tar.gz: ce5576b8d8f1f5dbeaa244629762343e4682093ee99227e1ff20954bf547a4ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52c2c1a80a64d33c78a82f38b2cea87f7625c6801c54cb605a98c86522a91a6376a5273d2833e7c0d15a8ee66715eff08077ae1c1683ab9fb011568d6b579919
|
|
7
|
+
data.tar.gz: 51ebde857fd8fe104ddc1c2f05beea25f1c86051868f3898aa1ea1490df733b9e59649c8ab3725a737c0a75aa80b7986a25a3d32017ff803d4c06ba5e155b951
|
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
|
|
@@ -10,7 +10,7 @@ jobs:
|
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
if: github.repository_owner == 'voxpupuli'
|
|
12
12
|
steps:
|
|
13
|
-
- uses: actions/checkout@
|
|
13
|
+
- uses: actions/checkout@v3
|
|
14
14
|
- name: Install Ruby 3.0
|
|
15
15
|
uses: ruby/setup-ruby@v1
|
|
16
16
|
with:
|
|
@@ -18,7 +18,7 @@ jobs:
|
|
|
18
18
|
env:
|
|
19
19
|
BUNDLE_WITHOUT: release
|
|
20
20
|
- name: Build gem
|
|
21
|
-
run: gem build *.gemspec
|
|
21
|
+
run: gem build --strict --verbose *.gemspec
|
|
22
22
|
- name: Publish gem to rubygems.org
|
|
23
23
|
run: gem push *.gem
|
|
24
24
|
env:
|
data/.github/workflows/test.yml
CHANGED
|
@@ -8,20 +8,30 @@ env:
|
|
|
8
8
|
BUNDLE_WITHOUT: release
|
|
9
9
|
|
|
10
10
|
jobs:
|
|
11
|
+
rubocop:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v3
|
|
15
|
+
- name: Install Ruby ${{ matrix.ruby }}
|
|
16
|
+
uses: ruby/setup-ruby@v1
|
|
17
|
+
with:
|
|
18
|
+
ruby-version: "3.2"
|
|
19
|
+
bundler-cache: true
|
|
20
|
+
- name: Run Rubocop
|
|
21
|
+
run: bundle exec rake rubocop
|
|
11
22
|
test:
|
|
12
23
|
runs-on: ubuntu-latest
|
|
13
24
|
strategy:
|
|
14
25
|
fail-fast: false
|
|
15
26
|
matrix:
|
|
16
27
|
ruby:
|
|
17
|
-
- "2.4"
|
|
18
|
-
- "2.5"
|
|
19
|
-
- "2.6"
|
|
20
28
|
- "2.7"
|
|
21
29
|
- "3.0"
|
|
30
|
+
- "3.1"
|
|
31
|
+
- "3.2"
|
|
22
32
|
name: Ruby ${{ matrix.ruby }}
|
|
23
33
|
steps:
|
|
24
|
-
- uses: actions/checkout@
|
|
34
|
+
- uses: actions/checkout@v3
|
|
25
35
|
- name: Install Ruby ${{ matrix.ruby }}
|
|
26
36
|
uses: ruby/setup-ruby@v1
|
|
27
37
|
with:
|
|
@@ -30,4 +40,13 @@ jobs:
|
|
|
30
40
|
- name: Run tests
|
|
31
41
|
run: bundle exec rake --rakefile Rakefile_ci -T | grep release
|
|
32
42
|
- name: Verify gem builds
|
|
33
|
-
run: gem build *.gemspec
|
|
43
|
+
run: gem build --strict --verbose *.gemspec
|
|
44
|
+
|
|
45
|
+
tests:
|
|
46
|
+
needs:
|
|
47
|
+
- rubocop
|
|
48
|
+
- test
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
name: Test suite
|
|
51
|
+
steps:
|
|
52
|
+
- run: echo Test suite completed
|
data/.rubocop.yml
ADDED
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config`
|
|
3
|
+
# on 2023-05-09 13:16:12 UTC using RuboCop version 1.50.2.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
11
|
+
Performance/StringInclude:
|
|
12
|
+
Exclude:
|
|
13
|
+
- 'lib/voxpupuli/release/rake_tasks.rb'
|
|
14
|
+
|
|
15
|
+
# Offense count: 1
|
|
16
|
+
# Configuration parameters: AllowedConstants.
|
|
17
|
+
Style/Documentation:
|
|
18
|
+
Exclude:
|
|
19
|
+
- 'spec/**/*'
|
|
20
|
+
- 'test/**/*'
|
|
21
|
+
- 'lib/voxpupuli/release/rake_tasks.rb'
|
|
22
|
+
|
|
23
|
+
# Offense count: 1
|
|
24
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
25
|
+
# Configuration parameters: EnforcedStyle, AllowComments.
|
|
26
|
+
# SupportedStyles: empty, nil, both
|
|
27
|
+
Style/EmptyElse:
|
|
28
|
+
Exclude:
|
|
29
|
+
- 'lib/voxpupuli/release/rake_tasks.rb'
|
|
30
|
+
|
|
31
|
+
# Offense count: 6
|
|
32
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
33
|
+
# Configuration parameters: EnforcedStyle.
|
|
34
|
+
# SupportedStyles: always, always_true, never
|
|
35
|
+
Style/FrozenStringLiteralComment:
|
|
36
|
+
Exclude:
|
|
37
|
+
- 'Gemfile'
|
|
38
|
+
- 'Rakefile'
|
|
39
|
+
- 'lib/voxpupuli/release.rb'
|
|
40
|
+
- 'lib/voxpupuli/release/rake_tasks.rb'
|
|
41
|
+
- 'lib/voxpupuli/release/version.rb'
|
|
42
|
+
- 'voxpupuli-release.gemspec'
|
|
43
|
+
|
|
44
|
+
# Offense count: 1
|
|
45
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
46
|
+
Style/LineEndConcatenation:
|
|
47
|
+
Exclude:
|
|
48
|
+
- 'lib/voxpupuli/release/rake_tasks.rb'
|
|
49
|
+
|
|
50
|
+
# Offense count: 1
|
|
51
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
52
|
+
# Configuration parameters: EnforcedStyle.
|
|
53
|
+
# SupportedStyles: literals, strict
|
|
54
|
+
Style/MutableConstant:
|
|
55
|
+
Exclude:
|
|
56
|
+
- 'lib/voxpupuli/release/version.rb'
|
|
57
|
+
|
|
58
|
+
# Offense count: 1
|
|
59
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
60
|
+
# Configuration parameters: Mode.
|
|
61
|
+
Style/StringConcatenation:
|
|
62
|
+
Exclude:
|
|
63
|
+
- 'lib/voxpupuli/release/rake_tasks.rb'
|
|
64
|
+
|
|
65
|
+
# Offense count: 1
|
|
66
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
67
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
|
68
|
+
# URISchemes: http, https
|
|
69
|
+
Layout/LineLength:
|
|
70
|
+
Max: 128
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [v3.0.0](https://github.com/voxpupuli/voxpupuli-release/tree/v3.0.0) (2023-05-09)
|
|
6
|
+
|
|
7
|
+
[Full Changelog](https://github.com/voxpupuli/voxpupuli-release/compare/v2.0.0...v3.0.0)
|
|
8
|
+
|
|
9
|
+
**Breaking changes:**
|
|
10
|
+
|
|
11
|
+
- Drop Ruby 2.5/2.6 support; introduce voxpupuli-rubocop; cleanup CI [\#53](https://github.com/voxpupuli/voxpupuli-release/pull/53) ([bastelfreak](https://github.com/bastelfreak))
|
|
12
|
+
|
|
13
|
+
**Implemented enhancements:**
|
|
14
|
+
|
|
15
|
+
- Avoid producing a backtrace for deprecated tasks [\#52](https://github.com/voxpupuli/voxpupuli-release/pull/52) ([smortex](https://github.com/smortex))
|
|
16
|
+
|
|
17
|
+
**Merged pull requests:**
|
|
18
|
+
|
|
19
|
+
- gemspec: Add version constraints for dependencies & build gem with strictness and verbosity [\#54](https://github.com/voxpupuli/voxpupuli-release/pull/54) ([bastelfreak](https://github.com/bastelfreak))
|
|
20
|
+
|
|
21
|
+
## [v2.0.0](https://github.com/voxpupuli/voxpupuli-release/tree/v2.0.0) (2023-02-22)
|
|
22
|
+
|
|
23
|
+
[Full Changelog](https://github.com/voxpupuli/voxpupuli-release/compare/v1.3.0...v2.0.0)
|
|
24
|
+
|
|
25
|
+
**Breaking changes:**
|
|
26
|
+
|
|
27
|
+
- Drop Ruby 2.4 support [\#46](https://github.com/voxpupuli/voxpupuli-release/pull/46) ([bastelfreak](https://github.com/bastelfreak))
|
|
28
|
+
|
|
29
|
+
**Implemented enhancements:**
|
|
30
|
+
|
|
31
|
+
- Rework release preparation tasks [\#44](https://github.com/voxpupuli/voxpupuli-release/pull/44) ([smortex](https://github.com/smortex))
|
|
32
|
+
- Add Ruby 3.1 to CI matrix [\#43](https://github.com/voxpupuli/voxpupuli-release/pull/43) ([bastelfreak](https://github.com/bastelfreak))
|
|
33
|
+
|
|
34
|
+
**Fixed bugs:**
|
|
35
|
+
|
|
36
|
+
- README.md: Fix link to LICENSE file [\#42](https://github.com/voxpupuli/voxpupuli-release/pull/42) ([bastelfreak](https://github.com/bastelfreak))
|
|
37
|
+
|
|
38
|
+
**Merged pull requests:**
|
|
39
|
+
|
|
40
|
+
- Bump actions/checkout from 2 to 3 [\#50](https://github.com/voxpupuli/voxpupuli-release/pull/50) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
41
|
+
- dependabot: check for github actions as well [\#49](https://github.com/voxpupuli/voxpupuli-release/pull/49) ([bastelfreak](https://github.com/bastelfreak))
|
|
42
|
+
- Add Ruby 3.2 to CI matrix [\#48](https://github.com/voxpupuli/voxpupuli-release/pull/48) ([bastelfreak](https://github.com/bastelfreak))
|
|
43
|
+
- Replace `Depreciated` with `Deprecated` [\#47](https://github.com/voxpupuli/voxpupuli-release/pull/47) ([alexjfisher](https://github.com/alexjfisher))
|
|
44
|
+
- Add Test badge [\#45](https://github.com/voxpupuli/voxpupuli-release/pull/45) ([bastelfreak](https://github.com/bastelfreak))
|
|
45
|
+
|
|
5
46
|
## [v1.3.0](https://github.com/voxpupuli/voxpupuli-release/tree/v1.3.0) (2021-12-08)
|
|
6
47
|
|
|
7
48
|
[Full Changelog](https://github.com/voxpupuli/voxpupuli-release/compare/v1.2.1...v1.3.0)
|
data/Gemfile
CHANGED
|
@@ -3,5 +3,6 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
|
|
3
3
|
gemspec
|
|
4
4
|
|
|
5
5
|
group :release, optional: true do
|
|
6
|
-
gem '
|
|
6
|
+
gem 'faraday-retry', '~> 2.1', require: false
|
|
7
|
+
gem 'github_changelog_generator', '~> 1.16.4', require: false
|
|
7
8
|
end
|
data/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Vox Pupuli Release Gem
|
|
2
2
|
|
|
3
|
-
[](https://github.com/voxpupuli/voxpupuli-
|
|
3
|
+
[](https://github.com/voxpupuli/voxpupuli-release/blob/master/LICENSE)
|
|
4
4
|
[](https://github.com/voxpupuli/voxpupuli-release/actions/workflows/release.yml)
|
|
5
|
+
[](https://github.com/voxpupuli/voxpupuli-release/actions/workflows/test.yml)
|
|
5
6
|
[](https://rubygems.org/gems/voxpupuli-release)
|
|
6
7
|
[](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.
|
data/Rakefile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
$LOAD_PATH.unshift File.expand_path('lib', __dir__)
|
|
2
2
|
require 'voxpupuli/release/version'
|
|
3
3
|
|
|
4
|
-
task :
|
|
4
|
+
task default: :dummy
|
|
5
5
|
|
|
6
6
|
desc 'Dummy rake task'
|
|
7
7
|
task 'dummy' do
|
|
@@ -10,13 +10,21 @@ end
|
|
|
10
10
|
|
|
11
11
|
begin
|
|
12
12
|
require 'github_changelog_generator/task'
|
|
13
|
+
rescue LoadError
|
|
14
|
+
# github_changelog_generator is an optional group
|
|
15
|
+
else
|
|
13
16
|
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
|
14
17
|
version = Voxpupuli::Release::VERSION
|
|
15
|
-
config.future_release = "v#{version}" if
|
|
18
|
+
config.future_release = "v#{version}" if /^\d+\.\d+.\d+$/.match?(version)
|
|
16
19
|
config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file."
|
|
17
|
-
config.exclude_labels = %w
|
|
20
|
+
config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog]
|
|
18
21
|
config.user = 'voxpupuli'
|
|
19
22
|
config.project = 'voxpupuli-release'
|
|
20
23
|
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
begin
|
|
27
|
+
require 'voxpupuli/rubocop/rake'
|
|
21
28
|
rescue LoadError
|
|
29
|
+
# the voxpupuli-rubocop gem is optional
|
|
22
30
|
end
|
|
@@ -1,42 +1,85 @@
|
|
|
1
1
|
require 'puppet_blacksmith/rake_tasks'
|
|
2
2
|
|
|
3
|
+
class GCGConfig
|
|
4
|
+
class << self
|
|
5
|
+
attr_writer :user
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def self.user
|
|
9
|
+
@user || project.split(%r{[-/]}).first
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
class << self
|
|
13
|
+
attr_writer :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
|
+
class << self
|
|
26
|
+
attr_writer :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|
|
|
6
47
|
t.build = false # do not build the module nor push it to the Forge
|
|
7
48
|
t.tag_sign = true # sign release with gpg
|
|
8
|
-
t.tag_message_pattern =
|
|
49
|
+
t.tag_message_pattern = 'Version %s' # required tag message for gpg-signed tags
|
|
9
50
|
# just do the tagging [:clean, :tag, :bump_commit]
|
|
10
51
|
end
|
|
11
52
|
|
|
12
53
|
m = Blacksmith::Modulefile.new
|
|
13
54
|
v = m.version
|
|
14
|
-
|
|
15
|
-
|
|
55
|
+
unless v.match?(/^\d+\.\d+.\d+$/)
|
|
56
|
+
raise "Refusing to release an RC or build-release (#{v}).\n" +
|
|
57
|
+
'Please set a semver *release* version.'
|
|
58
|
+
end
|
|
16
59
|
|
|
17
60
|
# validate that the REFERENCE.md is up2date, if it exists
|
|
18
61
|
Rake::Task['strings:validate:reference'].invoke if File.exist?('REFERENCE.md')
|
|
19
62
|
Rake::Task[:check_changelog].invoke
|
|
20
63
|
# do a "manual" module:release (clean, tag, bump, commit, push tags)
|
|
21
|
-
Rake::Task[
|
|
64
|
+
Rake::Task['module:clean'].invoke
|
|
22
65
|
|
|
23
66
|
# idempotently create tags
|
|
24
67
|
g = Blacksmith::Git.new
|
|
25
|
-
Rake::Task[
|
|
68
|
+
Rake::Task['module:tag'].invoke unless g.has_version_tag?(v)
|
|
26
69
|
|
|
27
70
|
v_inc = m.increase_version(v)
|
|
28
71
|
v_new = "#{v_inc}-rc0"
|
|
29
72
|
ENV['BLACKSMITH_FULL_VERSION'] = v_new
|
|
30
|
-
Rake::Task[
|
|
73
|
+
Rake::Task['module:bump:full'].invoke
|
|
31
74
|
|
|
32
75
|
# push it out, and let GitHub Actions do the release:
|
|
33
76
|
g.commit_modulefile!(v_new)
|
|
34
77
|
g.push!
|
|
35
78
|
end
|
|
36
79
|
|
|
37
|
-
desc '
|
|
38
|
-
task
|
|
39
|
-
|
|
80
|
+
desc 'Deprecated: use the "release" task instead'
|
|
81
|
+
task 'travis_release' do
|
|
82
|
+
warn "Deprecated: use the 'release' task instead"
|
|
40
83
|
Rake::Task['release'].invoke
|
|
41
84
|
end
|
|
42
85
|
|
|
@@ -48,7 +91,86 @@ task :check_changelog do
|
|
|
48
91
|
# ## 2016-11-20 Release 4.0.2
|
|
49
92
|
# ## [v4.0.3-rc0](https://github.com/voxpupuli/puppet-r10k/tree/v4.0.3-rc0) (2016-12-13)
|
|
50
93
|
# ## [2.1.0](https://github.com/opus-codium/puppet-odoo/tree/2.1.0) (2021-12-02)
|
|
51
|
-
if File.readlines('CHANGELOG.md').grep(
|
|
52
|
-
|
|
94
|
+
if File.readlines('CHANGELOG.md').grep(/^(#.+[Rr]eleas.+#{Regexp.escape(v)}|## \[v?#{Regexp.escape(v)}\])/).empty?
|
|
95
|
+
raise "Unable to find a CHANGELOG.md entry for the #{v} release."
|
|
53
96
|
end
|
|
54
97
|
end
|
|
98
|
+
|
|
99
|
+
namespace :release do
|
|
100
|
+
desc 'Prepare a release'
|
|
101
|
+
task prepare: ['release:porcelain:changelog'] do
|
|
102
|
+
v = Blacksmith::Modulefile.new.version
|
|
103
|
+
Rake::Task['strings:generate:reference'].invoke if File.exist?('REFERENCE.md')
|
|
104
|
+
puts <<~MESSAGE
|
|
105
|
+
|
|
106
|
+
Please review these changes and commit them to a new branch:
|
|
107
|
+
|
|
108
|
+
git checkout -b release-#{v}
|
|
109
|
+
git commit -m "Release #{v}"
|
|
110
|
+
|
|
111
|
+
Then open a Pull-Request and wait for it to be reviewed and merged).
|
|
112
|
+
MESSAGE
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
namespace :porcelain do
|
|
116
|
+
require 'github_changelog_generator/task'
|
|
117
|
+
rescue LoadError
|
|
118
|
+
desc 'Dummy'
|
|
119
|
+
task :changelog do
|
|
120
|
+
puts 'Skipping CHANGELOG.md generation. Ensure github_changelog_generator is present if you expected it to be generated.'
|
|
121
|
+
end
|
|
122
|
+
else
|
|
123
|
+
task :changelog do
|
|
124
|
+
# This is taken from lib/github_changelog_generator/task
|
|
125
|
+
# The generator cannot be used because we want to lazyly evaluate
|
|
126
|
+
# GCGConfig.user which might be overrider in the module Rakefile.
|
|
127
|
+
options = GitHubChangelogGenerator::Parser.default_options
|
|
128
|
+
options[:user] = GCGConfig.user
|
|
129
|
+
options[:project] = GCGConfig.project
|
|
130
|
+
options[:future_release] = GCGConfig.future_release
|
|
131
|
+
options[:header] = <<~HEADER.chomp
|
|
132
|
+
# Changelog
|
|
133
|
+
|
|
134
|
+
All notable changes to this project will be documented in this file.
|
|
135
|
+
Each new release typically also includes the latest modulesync defaults.
|
|
136
|
+
These should not affect the functionality of the module.
|
|
137
|
+
HEADER
|
|
138
|
+
options[:exclude_labels] = %w[duplicate question invalid wontfix wont-fix modulesync skip-changelog]
|
|
139
|
+
generator = GitHubChangelogGenerator::Generator.new(options)
|
|
140
|
+
log = generator.compound_changelog
|
|
141
|
+
output_filename = options[:output].to_s
|
|
142
|
+
|
|
143
|
+
# Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
|
|
144
|
+
require 'rbconfig'
|
|
145
|
+
unless RbConfig::CONFIG['host_os'].match?(/windows/)
|
|
146
|
+
puts 'Fixing line endings...'
|
|
147
|
+
log.gsub!("\r\n", "\n")
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
File.write(output_filename, log)
|
|
151
|
+
puts "Generated log placed in #{File.absolute_path(output_filename)}"
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# For backward compatibility
|
|
157
|
+
task :changelog do
|
|
158
|
+
warn <<-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
|
+
exit(1)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# For backward compatibility
|
|
168
|
+
task :reference do
|
|
169
|
+
warn <<-ERROR
|
|
170
|
+
The "reference" task is deprecated.
|
|
171
|
+
|
|
172
|
+
Prefer "release:prepare" which manage all pre-release steps, or directly run
|
|
173
|
+
the "strings:generate:reference" task.
|
|
174
|
+
ERROR
|
|
175
|
+
exit(1)
|
|
176
|
+
end
|
data/voxpupuli-release.gemspec
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('lib', __dir__)
|
|
3
2
|
require 'voxpupuli/release/version'
|
|
4
3
|
|
|
5
4
|
Gem::Specification.new do |s|
|
|
@@ -9,15 +8,17 @@ Gem::Specification.new do |s|
|
|
|
9
8
|
s.email = ['voxpupuli@groups.io']
|
|
10
9
|
s.homepage = 'https://github.com/voxpupuli/voxpupuli-release'
|
|
11
10
|
s.summary = 'Helpers for deploying Vox Pupuli modules'
|
|
12
|
-
s.description = s.summary
|
|
13
11
|
s.licenses = 'Apache-2.0'
|
|
14
12
|
|
|
13
|
+
s.required_ruby_version = '>= 2.7', '< 4'
|
|
14
|
+
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
|
16
|
-
s.
|
|
17
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
|
18
17
|
|
|
19
18
|
# Runtime dependencies, but also probably dependencies of requiring projects
|
|
20
|
-
s.add_runtime_dependency '
|
|
21
|
-
s.add_runtime_dependency 'puppet-
|
|
22
|
-
s.add_runtime_dependency '
|
|
19
|
+
s.add_runtime_dependency 'puppet-blacksmith', '~> 7.0'
|
|
20
|
+
s.add_runtime_dependency 'puppet-strings', '~> 4'
|
|
21
|
+
s.add_runtime_dependency 'rake', '~> 13.0', '>= 13.0.6'
|
|
22
|
+
|
|
23
|
+
s.add_development_dependency 'voxpupuli-rubocop', '~> 1.2'
|
|
23
24
|
end
|
metadata
CHANGED
|
@@ -1,58 +1,78 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: voxpupuli-release
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.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-05-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: puppet-blacksmith
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0'
|
|
19
|
+
version: '7.0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - "
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0'
|
|
26
|
+
version: '7.0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: puppet-
|
|
28
|
+
name: puppet-strings
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - "
|
|
31
|
+
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 4
|
|
33
|
+
version: '4'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- - "
|
|
38
|
+
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 4
|
|
40
|
+
version: '4'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
42
|
+
name: rake
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '13.0'
|
|
45
48
|
- - ">="
|
|
46
49
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
50
|
+
version: 13.0.6
|
|
48
51
|
type: :runtime
|
|
49
52
|
prerelease: false
|
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
54
|
requirements:
|
|
55
|
+
- - "~>"
|
|
56
|
+
- !ruby/object:Gem::Version
|
|
57
|
+
version: '13.0'
|
|
52
58
|
- - ">="
|
|
53
59
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
55
|
-
|
|
60
|
+
version: 13.0.6
|
|
61
|
+
- !ruby/object:Gem::Dependency
|
|
62
|
+
name: voxpupuli-rubocop
|
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - "~>"
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '1.2'
|
|
68
|
+
type: :development
|
|
69
|
+
prerelease: false
|
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - "~>"
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '1.2'
|
|
75
|
+
description:
|
|
56
76
|
email:
|
|
57
77
|
- voxpupuli@groups.io
|
|
58
78
|
executables: []
|
|
@@ -63,6 +83,8 @@ files:
|
|
|
63
83
|
- ".github/workflows/release.yml"
|
|
64
84
|
- ".github/workflows/test.yml"
|
|
65
85
|
- ".gitignore"
|
|
86
|
+
- ".rubocop.yml"
|
|
87
|
+
- ".rubocop_todo.yml"
|
|
66
88
|
- CHANGELOG.md
|
|
67
89
|
- Gemfile
|
|
68
90
|
- LICENSE
|
|
@@ -85,14 +107,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
85
107
|
requirements:
|
|
86
108
|
- - ">="
|
|
87
109
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: '
|
|
110
|
+
version: '2.7'
|
|
111
|
+
- - "<"
|
|
112
|
+
- !ruby/object:Gem::Version
|
|
113
|
+
version: '4'
|
|
89
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
115
|
requirements:
|
|
91
116
|
- - ">="
|
|
92
117
|
- !ruby/object:Gem::Version
|
|
93
118
|
version: '0'
|
|
94
119
|
requirements: []
|
|
95
|
-
rubygems_version: 3.2.
|
|
120
|
+
rubygems_version: 3.2.33
|
|
96
121
|
signing_key:
|
|
97
122
|
specification_version: 4
|
|
98
123
|
summary: Helpers for deploying Vox Pupuli modules
|