runger_release_assistant 3.2.0 → 4.1.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/.release_assistant.yml +0 -1
- data/CHANGELOG.md +7 -1
- data/Gemfile.lock +2 -2
- data/README.md +11 -6
- data/lib/runger_release_assistant/version.rb +1 -1
- data/lib/runger_release_assistant.rb +19 -23
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ad2c73ce4962b251c902dbe5bdb69f65cd30efc604fa9de98ac16be34a964a9
|
4
|
+
data.tar.gz: ab3f19726d8156a7a16443e9898229c77a75a5b6a228d1a87ef8ae90c1b28d05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84899c866e3fa6935233cdca4ac0f2dea0e032160b10091830d50efb0f9e4ada98c2edc3bebf70236b2280638e2867879b15183786a094b3f0a2a6a807435656
|
7
|
+
data.tar.gz: d6193ba1d6e26f48e3d13dd09c8f884b1bbf89397bc207e22ef7a4ad477b3818607bddee70f57d115fae36354770e30b4e8a43280ad3c3d972a9a000de8b9ec2
|
data/.release_assistant.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
## Unreleased
|
2
2
|
[no unreleased changes yet]
|
3
3
|
|
4
|
+
## v4.1.0 (2025-03-20)
|
5
|
+
- Support optional tag prefix (via a `tag_prefix` in `.release_assistant.yml`).
|
6
|
+
|
7
|
+
## v4.0.0 (2025-03-20)
|
8
|
+
- **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).
|
9
|
+
|
4
10
|
## v3.2.0 (2025-03-20)
|
5
11
|
- Add `-a` flag to `git tag` command to be clear that the tag is annotated.
|
6
12
|
|
@@ -11,7 +17,7 @@
|
|
11
17
|
- Actually push to git even if RubyGems is also enabled.
|
12
18
|
|
13
19
|
## v3.0.0 (2025-03-20)
|
14
|
-
- Stop creating a new alpha version after release.
|
20
|
+
- **BREAKING:** Stop creating a new alpha version after release.
|
15
21
|
- Push to git even if pushing to RubyGems is not enabled.
|
16
22
|
|
17
23
|
## v2.0.1 (2025-03-19)
|
data/Gemfile.lock
CHANGED
@@ -9,7 +9,7 @@ GIT
|
|
9
9
|
PATH
|
10
10
|
remote: .
|
11
11
|
specs:
|
12
|
-
runger_release_assistant (
|
12
|
+
runger_release_assistant (4.1.0)
|
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 (
|
193
|
+
runger_release_assistant (4.1.0)
|
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
@@ -112,7 +112,6 @@ Here is an example:
|
|
112
112
|
|
113
113
|
```yml
|
114
114
|
---
|
115
|
-
git: true
|
116
115
|
rubygems: false
|
117
116
|
primary_branch: main
|
118
117
|
```
|
@@ -120,11 +119,7 @@ primary_branch: main
|
|
120
119
|
The above example (more or less) illustrates the default values, so you don't
|
121
120
|
need to create a config file, if those are the values that you want.
|
122
121
|
|
123
|
-
Regarding the `primary_branch` option, `runger_release_assistant` will
|
124
|
-
automatically detect as the "primary branch" any one of the following: `main`,
|
125
|
-
`master`, or `trunk`. So, if one of those is the name of your primary branch,
|
126
|
-
and if you also want `git: true` and `rubygems: false`, then you don't need to
|
127
|
-
create a config file.
|
122
|
+
Regarding the `primary_branch` option, `runger_release_assistant` will automatically detect as the "primary branch" any one of the following: `main`, `master`, or `trunk`. So, if one of those is the name of your primary branch, and if you also want `rubygems: false`, then you don't need to create a config file.
|
128
123
|
|
129
124
|
## Post-release command
|
130
125
|
|
@@ -137,6 +132,16 @@ you'd also like to release the gem via RubyGems, then create a `.release_assista
|
|
137
132
|
executing `release --init`. Within that file, modify the default `rubygems: false` option to
|
138
133
|
`rubygems: true`.
|
139
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
|
+
|
140
145
|
## Development
|
141
146
|
|
142
147
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run
|
@@ -43,7 +43,7 @@ class RungerReleaseAssistant
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
DEFAULT_OPTIONS = {
|
46
|
+
DEFAULT_OPTIONS = { rubygems: false }.freeze
|
47
47
|
|
48
48
|
class << self
|
49
49
|
def define_slop_options(options)
|
@@ -53,9 +53,8 @@ class RungerReleaseAssistant
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
def initialize(options)
|
56
|
+
def initialize(options = {}) # rubocop:disable Style/OptionHash
|
57
57
|
@options = options
|
58
|
-
validate_options!
|
59
58
|
logger.debug("Running release with options #{@options}")
|
60
59
|
end
|
61
60
|
|
@@ -95,12 +94,6 @@ class RungerReleaseAssistant
|
|
95
94
|
|
96
95
|
private
|
97
96
|
|
98
|
-
def validate_options!
|
99
|
-
if @options[:git] != true
|
100
|
-
fail('The `git` configuration option must be `true`')
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
97
|
def ensure_on_main_branch
|
105
98
|
if current_branch != primary_branch
|
106
99
|
fail('You must be on the primary branch to release!')
|
@@ -187,11 +180,11 @@ class RungerReleaseAssistant
|
|
187
180
|
end
|
188
181
|
|
189
182
|
def create_tag
|
190
|
-
execute_command(%(git tag -a '#{
|
183
|
+
execute_command(%(git tag -a '#{git_tag(next_version)}' -m 'Version #{next_version}'))
|
191
184
|
end
|
192
185
|
|
193
|
-
def
|
194
|
-
"v#{version}"
|
186
|
+
def git_tag(version)
|
187
|
+
"#{@options[:tag_prefix]}v#{version}"
|
195
188
|
end
|
196
189
|
|
197
190
|
def push_to_rubygems_and_or_git
|
@@ -199,15 +192,7 @@ class RungerReleaseAssistant
|
|
199
192
|
push_to_rubygems
|
200
193
|
end
|
201
194
|
|
202
|
-
|
203
|
-
push_to_git
|
204
|
-
end
|
205
|
-
end
|
206
|
-
|
207
|
-
def push_to_git
|
208
|
-
logger.debug('Pushing to git remote')
|
209
|
-
execute_command('git push')
|
210
|
-
execute_command('git push --tags')
|
195
|
+
push_to_git
|
211
196
|
end
|
212
197
|
|
213
198
|
def push_to_rubygems
|
@@ -216,6 +201,12 @@ class RungerReleaseAssistant
|
|
216
201
|
execute_command('bundle exec rake release', show_system_output: true)
|
217
202
|
end
|
218
203
|
|
204
|
+
def push_to_git
|
205
|
+
logger.debug('Pushing to git remote')
|
206
|
+
execute_command('git push')
|
207
|
+
execute_command('git push --tags')
|
208
|
+
end
|
209
|
+
|
219
210
|
def run_post_release_command
|
220
211
|
post_release_command_query_command =
|
221
212
|
'runger-config --directory ~/code/dotfiles post-release-command'
|
@@ -284,7 +275,7 @@ class RungerReleaseAssistant
|
|
284
275
|
{ 'DELTA_PAGER' => 'cat' },
|
285
276
|
'git',
|
286
277
|
'diff',
|
287
|
-
"#{
|
278
|
+
"#{latest_tag}...",
|
288
279
|
)
|
289
280
|
end
|
290
281
|
|
@@ -310,9 +301,14 @@ class RungerReleaseAssistant
|
|
310
301
|
file_path('CHANGELOG.md')
|
311
302
|
end
|
312
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
|
+
|
313
309
|
memo_wise \
|
314
310
|
def current_released_version
|
315
|
-
|
311
|
+
latest_tag.match(/v(\d.*)$/)&.[](1)
|
316
312
|
end
|
317
313
|
|
318
314
|
memo_wise \
|