voxpupuli-release 1.3.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 606f972169119f56967f77a587da869e0ce334f7c2a965641d0e5bdabcd18955
4
- data.tar.gz: ce8bf749396849ba1716025a052c28c2b8aeb5798b7b97b10efac0772dc537df
3
+ metadata.gz: 356e4d7747c6128502901299af1fba19e71ea8b81b614d3a78a13b1c3d95be03
4
+ data.tar.gz: 15cf2e0e733939bc3e296647d8f12563dbbc8eefa674cf3f7cca804e2d69a02a
5
5
  SHA512:
6
- metadata.gz: 19bf5446634ce655c31632e5b0e24b0b70256cf90d9f980a150a8ec78f3d8bf1f8e02797b704c76305ed3aca7477805286f9bd28718697becb25e759eaa26001
7
- data.tar.gz: 9fd53026ed507a108ce7d1104eb908183c2403f104852af989c388f50d59cdb28422c698fba879788fd158a5e453fa57caa0b5215abd9e3290807b5760baf928
6
+ metadata.gz: b216fc76ab233fcc2ee7cdb3cfc37305bf8261485df34b50c09d00035ed336992f3ca038f43a5cee2233717b520b27eb04e87d03b7ff3a01e4465670c3571d98
7
+ data.tar.gz: 221799d7e7a52e39c9d16fc65087358f49fd140c9635d5a769bf0af6dae9711e967593cd6f2fc4965760eca086121543964cddafd1a367c5e39221123f99a4b4
@@ -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@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Install Ruby 3.0
15
15
  uses: ruby/setup-ruby@v1
16
16
  with:
@@ -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@v2
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,30 @@
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
+
5
29
  ## [v1.3.0](https://github.com/voxpupuli/voxpupuli-release/tree/v1.3.0) (2021-12-08)
6
30
 
7
31
  [Full Changelog](https://github.com/voxpupuli/voxpupuli-release/compare/v1.2.1...v1.3.0)
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-releasem/blob/master/LICENSE)
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 proper version. Also ensure that the `CHANGELOG.md` has a note about the release and that it actually is named Release or release, some old modules refer to it as Version, which won't work. Lastly check that no tag exists with that version number (format `v#.#.#`), and then run:
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,7 +53,7 @@ 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 =~ /^\d+\.\d+.\d+$/
56
+ "Please set a semver *release* version." unless v.match?(/^\d+\.\d+.\d+$/)
16
57
 
17
58
  # validate that the REFERENCE.md is up2date, if it exists
18
59
  Rake::Task['strings:validate:reference'].invoke if File.exist?('REFERENCE.md')
@@ -34,9 +75,9 @@ task :release do
34
75
  g.push!
35
76
  end
36
77
 
37
- desc 'Depreciated: use the "release" task instead'
78
+ desc 'Deprecated: use the "release" task instead'
38
79
  task "travis_release" do
39
- STDERR.puts "Depreciated: use the 'release' task instead"
80
+ STDERR.puts "Deprecated: use the 'release' task instead"
40
81
  Rake::Task['release'].invoke
41
82
  end
42
83
 
@@ -52,3 +93,82 @@ task :check_changelog do
52
93
  fail "Unable to find a CHANGELOG.md entry for the #{v} release."
53
94
  end
54
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
@@ -1,5 +1,5 @@
1
1
  module Voxpupuli
2
2
  module Release
3
- VERSION = '1.3.0'
3
+ VERSION = '2.0.0'
4
4
  end
5
5
  end
@@ -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) }
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: 1.3.0
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: 2021-12-08 00:00:00.000000000 Z
11
+ date: 2023-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -85,14 +85,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: '0'
88
+ version: '2.5'
89
+ - - "<"
90
+ - !ruby/object:Gem::Version
91
+ version: '4'
89
92
  required_rubygems_version: !ruby/object:Gem::Requirement
90
93
  requirements:
91
94
  - - ">="
92
95
  - !ruby/object:Gem::Version
93
96
  version: '0'
94
97
  requirements: []
95
- rubygems_version: 3.2.32
98
+ rubygems_version: 3.2.33
96
99
  signing_key:
97
100
  specification_version: 4
98
101
  summary: Helpers for deploying Vox Pupuli modules