runger_release_assistant 4.0.0 → 4.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3edb0dea318f7e1155a1491f49a2fc4d4e902b0686d4ee6d1d34aaa48d04ff60
4
- data.tar.gz: e0c2d42c3463ab41aa9fb308a4426818a5cf2bea5db22e4cc4a80fc2afcf28ae
3
+ metadata.gz: b0db4ae3ccdad86460829755ea81a12f5229ce7f3d57518ee358fea4408134cb
4
+ data.tar.gz: cd02f9c95f730b0629c969ac340270f9bff501c3cc88e14d9adfdfbe88ffc3f9
5
5
  SHA512:
6
- metadata.gz: 6f46f214ea6a2ffd298ddb6c9fcffdefb587981f5914a5375df9aac0dda3d3a4088504bd802963b607d1e111b190992c8efc2727ace002ad5c647594607c5ad9
7
- data.tar.gz: 5227226b3d8c007a3bd0d768749e1718e87318fc563d14b0d142bacb30c647d07b2fdcef9b4683a91dee7125fa37a58401777bd56e1329965b9f19b76293f651
6
+ metadata.gz: c11c344eee5f404ee0ec7c7b4ad99916df72d7886ec8e65f73a3f62c7f9b3d61d419150560927e40953e133098019cab3f859e4050e3b976d3fb6ba7b7eb4984
7
+ data.tar.gz: d9877790dc5faaf50d895956a4f7870a783c5e9c7383b061911b446b76adaccfbb40aa7a1ae62a35b22a32843cd9530ff3eac32697eb9db0e83afc7ba9071226
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  ## Unreleased
2
2
  [no unreleased changes yet]
3
3
 
4
+ ## v4.1.1 (2025-03-20)
5
+ ### Fixed
6
+ - Fix `NoMethodError` trying to print `nil` in blue if there is no latest tag.
7
+
8
+ ## v4.1.0 (2025-03-20)
9
+ - Support optional tag prefix (via a `tag_prefix` in `.release_assistant.yml`).
10
+
4
11
  ## v4.0.0 (2025-03-20)
5
12
  - **BREAKING:** Always push to git, rather than requiring `git: true` to be specified in the config (or respecting at all a `git` option in the config).
6
13
 
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GIT
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- runger_release_assistant (4.0.0)
12
+ runger_release_assistant (4.1.1)
13
13
  activesupport (>= 6)
14
14
  memo_wise (>= 1.7)
15
15
  rainbow (>= 3.0)
@@ -190,7 +190,7 @@ CHECKSUMS
190
190
  rubocop-rspec (3.5.0) sha256=710c942fe1af884ba8eea75cbb8bdbb051929a2208880a6fc2e2dce1eed5304c
191
191
  ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
192
192
  runger_byebug (11.4.0) sha256=569e22ba2215f57e7f69e145fcb63be401e29fcd312f7936d813e12d0c7bbee6
193
- runger_release_assistant (4.0.0)
193
+ runger_release_assistant (4.1.1)
194
194
  runger_style (5.7.0) sha256=200790f3998e0b924df17efc9d440ddec99508bae983ba2a63f42b80624762f0
195
195
  securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
196
196
  slop (4.10.1) sha256=844322b5ffcf17ed4815fdb173b04a20dd82b4fd93e3744c88c8fafea696d9c7
data/README.md CHANGED
@@ -132,6 +132,16 @@ you'd also like to release the gem via RubyGems, then create a `.release_assista
132
132
  executing `release --init`. Within that file, modify the default `rubygems: false` option to
133
133
  `rubygems: true`.
134
134
 
135
+ ## Tag prefix
136
+
137
+ By default, Git tags are created like `v1.0.0`. If you would like to prefix the git tag with any additional content, you may specify a `tag_prefix` in `.release_assistant.yml`, such as:
138
+
139
+ ```yml
140
+ tag_prefix: gem/
141
+ ```
142
+
143
+ This example would generate tags in the form `gem/v1.0.0`.
144
+
135
145
  ## Development
136
146
 
137
147
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run
@@ -2,6 +2,6 @@
2
2
 
3
3
  # rubocop:disable Style/StaticClass
4
4
  class RungerReleaseAssistant
5
- VERSION = '4.0.0'
5
+ VERSION = '4.1.1'
6
6
  end
7
7
  # rubocop:enable Style/StaticClass
@@ -102,7 +102,7 @@ class RungerReleaseAssistant
102
102
 
103
103
  def print_release_info
104
104
  logger.info("You are running the release process with options #{@options.to_h}.")
105
- logger.info("Current released version is #{current_released_version.blue}.")
105
+ logger.info("Current released version is #{(current_released_version || '[none]').blue}.")
106
106
  logger.info("Next version will be #{next_version.green}.")
107
107
 
108
108
  print_changelog_content_of_upcoming_release
@@ -180,11 +180,11 @@ class RungerReleaseAssistant
180
180
  end
181
181
 
182
182
  def create_tag
183
- execute_command(%(git tag -a '#{git_tag_version(next_version)}' -m 'Version #{next_version}'))
183
+ execute_command(%(git tag -a '#{git_tag(next_version)}' -m 'Version #{next_version}'))
184
184
  end
185
185
 
186
- def git_tag_version(version)
187
- "v#{version}"
186
+ def git_tag(version)
187
+ "#{@options[:tag_prefix]}v#{version}"
188
188
  end
189
189
 
190
190
  def push_to_rubygems_and_or_git
@@ -275,7 +275,7 @@ class RungerReleaseAssistant
275
275
  { 'DELTA_PAGER' => 'cat' },
276
276
  'git',
277
277
  'diff',
278
- "#{git_tag_version(current_released_version)}...",
278
+ "#{latest_tag}...",
279
279
  )
280
280
  end
281
281
 
@@ -301,9 +301,14 @@ class RungerReleaseAssistant
301
301
  file_path('CHANGELOG.md')
302
302
  end
303
303
 
304
+ memo_wise \
305
+ def latest_tag
306
+ `git tag -l 'v[0-9]*.[0-9]*.[0-9]*' | sort -V | tail -1`.rstrip
307
+ end
308
+
304
309
  memo_wise \
305
310
  def current_released_version
306
- `git tag -l 'v[0-9]*.[0-9]*.[0-9]*' | sort -V | tail -1`.delete_prefix('v').rstrip
311
+ latest_tag.match(/v(\d.*)$/)&.[](1)
307
312
  end
308
313
 
309
314
  memo_wise \
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runger_release_assistant
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Runger