runger_release_assistant 0.14.0 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6786fcec187bf4caee47826bc91b79b35a0d4f78497278da0f3e5d3463edd790
4
- data.tar.gz: cc41f2087c50e366a23660d724a3abdc753c8a136894e26f92cc389d806199e5
3
+ metadata.gz: 1fd1765bf53528b6bbeead8fb86e0bb4724e5099754c5a13718695bf995d1350
4
+ data.tar.gz: bc7792a78e64e251716e833968652b613963f3b28c9f86305e3987ee30f4dc1e
5
5
  SHA512:
6
- metadata.gz: 4f842cc1ece0e8f1c695f2a78468c9c18f115f9c190c7158cf69a99a51b29caeebc6f1fc57ebe8d51d45ea2d841135f1da52b964e1cbb4af6b7dc088b12d6976
7
- data.tar.gz: 6aa187e5959bf974adf904070577fb9b754beff1d8120e8cba92918b37360ebeec00c95e3bd981e6c03f740b2f4356e512e56c355ccadd5253d09235e74536af
6
+ metadata.gz: e40acdfe2472e00fbf65a39b9227442dcbd1f0a83bac348fcf4e492a3edb197dcc105b4a259dc512d612cabeafebdd0fc466299b07498241953de3493b72a4fc
7
+ data.tar.gz: cf0d5f5e637324e250b0575bf99382ad10bded2e1fe17484b13264f3786eb2ca399000402bebb1e3ce473a071ad3f3c5872429d15fbd8f3902a94e81c9c7926c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v2.0.0 (2025-02-05)
2
+ - **BREAKING:** Source post-release command from `~/code/dotfiles` [`runger-config`](https://github.com/davidrunger/dotfiles/blob/cd02495fb2ad742cc1e85cc65aea5ff711485981/crystal-programs/runger-config.cr), rather than always running `main` command (if available).
3
+
4
+ ## v1.0.0 (2025-01-29)
5
+ - **BREAKING:** Run `main` (not `safe`) after releasing.
6
+
1
7
  ## v0.14.0 (2024-12-31)
2
8
  - Ensure we are on the primary branch when releasing
3
9
 
data/Gemfile CHANGED
@@ -8,9 +8,14 @@ gemspec
8
8
 
9
9
  group :development, :test do
10
10
  gem 'bundler', require: false
11
+ # Remove if/when byebug brings in this dependency for us.
12
+ gem 'irb'
11
13
  gem 'pry'
12
- gem 'pry-byebug'
14
+ # Go back to upstream if/when https://github.com/deivid-rodriguez/pry-byebug/pull/ 428 is merged.
15
+ gem 'pry-byebug', github: 'davidrunger/pry-byebug'
13
16
  gem 'rake', require: false
17
+ # Remove if/when byebug brings in this dependency for us.
18
+ gem 'reline'
14
19
  gem 'rspec', require: false
15
20
  gem 'rubocop', require: false
16
21
  gem 'rubocop-performance', require: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,15 @@
1
+ GIT
2
+ remote: https://github.com/davidrunger/pry-byebug.git
3
+ revision: f6f73023ba081630ddee32ae4399fb31706f074f
4
+ specs:
5
+ pry-byebug (3.10.1)
6
+ byebug (>= 11.0)
7
+ pry (>= 0.13)
8
+
1
9
  PATH
2
10
  remote: .
3
11
  specs:
4
- runger_release_assistant (0.14.0)
12
+ runger_release_assistant (2.0.0)
5
13
  activesupport (>= 6)
6
14
  memo_wise (>= 1.7)
7
15
  rainbow (>= 3.0)
@@ -29,33 +37,46 @@ GEM
29
37
  bigdecimal (3.1.9)
30
38
  byebug (11.1.3)
31
39
  coderay (1.1.3)
32
- concurrent-ruby (1.3.4)
33
- connection_pool (2.4.1)
40
+ concurrent-ruby (1.3.5)
41
+ connection_pool (2.5.0)
42
+ date (3.4.1)
34
43
  diff-lcs (1.5.1)
35
44
  drb (2.2.1)
36
- i18n (1.14.6)
45
+ i18n (1.14.7)
37
46
  concurrent-ruby (~> 1.0)
47
+ io-console (0.8.0)
48
+ irb (1.15.1)
49
+ pp (>= 0.6.0)
50
+ rdoc (>= 4.0.0)
51
+ reline (>= 0.4.2)
38
52
  json (2.9.1)
39
- language_server-protocol (3.17.0.3)
40
- logger (1.6.4)
53
+ language_server-protocol (3.17.0.4)
54
+ logger (1.6.5)
41
55
  memo_wise (1.10.0)
42
56
  method_source (1.1.0)
43
57
  minitest (5.25.4)
44
58
  parallel (1.26.3)
45
- parser (3.3.6.0)
59
+ parser (3.3.7.0)
46
60
  ast (~> 2.4.1)
47
61
  racc
62
+ pp (0.6.2)
63
+ prettyprint
64
+ prettyprint (0.2.0)
48
65
  prism (1.3.0)
49
- pry (0.14.2)
66
+ pry (0.15.2)
50
67
  coderay (~> 1.1)
51
68
  method_source (~> 1.0)
52
- pry-byebug (3.10.1)
53
- byebug (~> 11.0)
54
- pry (>= 0.13, < 0.15)
69
+ psych (5.2.3)
70
+ date
71
+ stringio
55
72
  racc (1.8.1)
56
73
  rainbow (3.1.1)
57
74
  rake (13.2.1)
75
+ rdoc (6.11.0)
76
+ psych (>= 4.0.0)
58
77
  regexp_parser (2.10.0)
78
+ reline (0.6.0)
79
+ io-console (~> 0.5)
59
80
  rspec (3.13.0)
60
81
  rspec-core (~> 3.13.0)
61
82
  rspec-expectations (~> 3.13.0)
@@ -68,33 +89,34 @@ GEM
68
89
  rspec-mocks (3.13.2)
69
90
  diff-lcs (>= 1.2.0, < 2.0)
70
91
  rspec-support (~> 3.13.0)
71
- rspec-support (3.13.1)
72
- rubocop (1.69.2)
92
+ rspec-support (3.13.2)
93
+ rubocop (1.71.2)
73
94
  json (~> 2.3)
74
95
  language_server-protocol (>= 3.17.0)
75
96
  parallel (~> 1.10)
76
97
  parser (>= 3.3.0.2)
77
98
  rainbow (>= 2.2.2, < 4.0)
78
99
  regexp_parser (>= 2.9.3, < 3.0)
79
- rubocop-ast (>= 1.36.2, < 2.0)
100
+ rubocop-ast (>= 1.38.0, < 2.0)
80
101
  ruby-progressbar (~> 1.7)
81
102
  unicode-display_width (>= 2.4.0, < 4.0)
82
- rubocop-ast (1.37.0)
103
+ rubocop-ast (1.38.0)
83
104
  parser (>= 3.3.1.0)
84
- rubocop-performance (1.23.0)
105
+ rubocop-performance (1.23.1)
85
106
  rubocop (>= 1.48.1, < 2.0)
86
107
  rubocop-ast (>= 1.31.1, < 2.0)
87
- rubocop-rspec (3.3.0)
108
+ rubocop-rspec (3.4.0)
88
109
  rubocop (~> 1.61)
89
110
  ruby-progressbar (1.13.0)
90
- runger_style (3.0.0)
111
+ runger_style (4.3.0)
91
112
  prism (>= 0.24.0)
92
113
  rubocop (>= 1.68.0)
93
114
  securerandom (0.4.1)
94
115
  slop (4.10.1)
116
+ stringio (3.1.2)
95
117
  tzinfo (2.0.6)
96
118
  concurrent-ruby (~> 1.0)
97
- unicode-display_width (3.1.3)
119
+ unicode-display_width (3.1.4)
98
120
  unicode-emoji (~> 4.0, >= 4.0.4)
99
121
  unicode-emoji (4.0.4)
100
122
  uri (1.0.2)
@@ -104,9 +126,11 @@ PLATFORMS
104
126
 
105
127
  DEPENDENCIES
106
128
  bundler
129
+ irb
107
130
  pry
108
- pry-byebug
131
+ pry-byebug!
109
132
  rake
133
+ reline
110
134
  rspec
111
135
  rubocop
112
136
  rubocop-performance
@@ -114,6 +138,62 @@ DEPENDENCIES
114
138
  runger_release_assistant!
115
139
  runger_style
116
140
 
141
+ CHECKSUMS
142
+ activesupport (8.0.1) sha256=fd5bc74641c24ac3541055c2879789198ff42adee3e39c2933289ba008912e37
143
+ ast (2.4.2) sha256=1e280232e6a33754cde542bc5ef85520b74db2aac73ec14acef453784447cc12
144
+ base64 (0.2.0) sha256=0f25e9b21a02a0cc0cea8ef92b2041035d39350946e8789c562b2d1a3da01507
145
+ benchmark (0.4.0) sha256=0f12f8c495545e3710c3e4f0480f63f06b4c842cc94cec7f33a956f5180e874a
146
+ bigdecimal (3.1.9) sha256=2ffc742031521ad69c2dfc815a98e426a230a3d22aeac1995826a75dabfad8cc
147
+ byebug (11.1.3) sha256=2485944d2bb21283c593d562f9ae1019bf80002143cc3a255aaffd4e9cf4a35b
148
+ coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
149
+ concurrent-ruby (1.3.5) sha256=813b3e37aca6df2a21a3b9f1d497f8cbab24a2b94cab325bffe65ee0f6cbebc6
150
+ connection_pool (2.5.0) sha256=233b92f8d38e038c1349ccea65dd3772727d669d6d2e71f9897c8bf5cd53ebfc
151
+ date (3.4.1) sha256=bf268e14ef7158009bfeaec40b5fa3c7271906e88b196d958a89d4b408abe64f
152
+ diff-lcs (1.5.1) sha256=273223dfb40685548436d32b4733aa67351769c7dea621da7d9dd4813e63ddfe
153
+ drb (2.2.1) sha256=e9d472bf785f558b96b25358bae115646da0dbfd45107ad858b0bc0d935cb340
154
+ i18n (1.14.7) sha256=ceba573f8138ff2c0915427f1fc5bdf4aa3ab8ae88c8ce255eb3ecf0a11a5d0f
155
+ io-console (0.8.0) sha256=cd6a9facbc69871d69b2cb8b926fc6ea7ef06f06e505e81a64f14a470fddefa2
156
+ irb (1.15.1) sha256=d9bca745ac4207a8b728a52b98b766ca909b86ff1a504bcde3d6f8c84faae890
157
+ json (2.9.1) sha256=d2bdef4644052fad91c1785d48263756fe32fcac08b96a20bb15840e96550d11
158
+ language_server-protocol (3.17.0.4) sha256=c484626478664fd13482d8180947c50a8590484b1258b99b7aedb3b69df89669
159
+ logger (1.6.5) sha256=c3cfe56d01656490ddd103d38b8993d73d86296adebc5f58cefc9ec03741e56b
160
+ memo_wise (1.10.0) sha256=ae40ff8e7799697ff5d59d739b8766f76be22eba69c7c8468edb42ab83c94c3f
161
+ method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
162
+ minitest (5.25.4) sha256=9cf2cae25ac4dfc90c988ebc3b917f53c054978b673273da1bd20bcb0778f947
163
+ parallel (1.26.3) sha256=d86babb7a2b814be9f4b81587bf0b6ce2da7d45969fab24d8ae4bf2bb4d4c7ef
164
+ parser (3.3.7.0) sha256=7449011771e3e7881297859b849de26a6f4fccd515bece9520a87e7d2116119b
165
+ pp (0.6.2) sha256=947ec3120c6f92195f8ee8aa25a7b2c5297bb106d83b41baa02983686577b6ff
166
+ prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
167
+ prism (1.3.0) sha256=b11620829831b1cb7e6c9b46c81ff8a6e36ccb3f888f164485eb7351f386273a
168
+ pry (0.15.2) sha256=12d54b8640d3fa29c9211dd4ffb08f3fd8bf7a4fd9b5a73ce5b59c8709385b6b
169
+ pry-byebug (3.10.1)
170
+ psych (5.2.3) sha256=84a54bb952d14604fea22d99938348814678782f58b12648fcdfa4d2fce859ee
171
+ racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
172
+ rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
173
+ rake (13.2.1) sha256=46cb38dae65d7d74b6020a4ac9d48afed8eb8149c040eccf0523bec91907059d
174
+ rdoc (6.11.0) sha256=bec66fb9b019be64f7ba7d2cd2aecb283a3a01fef23a95b33e2349c6d1aa0040
175
+ regexp_parser (2.10.0) sha256=cb6f0ddde88772cd64bff1dbbf68df66d376043fe2e66a9ef77fcb1b0c548c61
176
+ reline (0.6.0) sha256=57620375dcbe56ec09bac7192bfb7460c716bbf0054dc94345ecaa5438e539d2
177
+ rspec (3.13.0) sha256=d490914ac1d5a5a64a0e1400c1d54ddd2a501324d703b8cfe83f458337bab993
178
+ rspec-core (3.13.2) sha256=94fbda6e4738e478f1c7532b7cc241272fcdc8b9eac03a97338b1122e4573300
179
+ rspec-expectations (3.13.3) sha256=0e6b5af59b900147698ea0ff80456c4f2e69cac4394fbd392fbd1ca561f66c58
180
+ rspec-mocks (3.13.2) sha256=2327335def0e1665325a9b617e3af9ae20272741d80ac550336309a7c59abdef
181
+ rspec-support (3.13.2) sha256=cea3a2463fd9b84b9dcc9685efd80ea701aa8f7b3decb3b3ce795ed67737dbec
182
+ rubocop (1.71.2) sha256=9a7b7501aac661a338ed7ff2a5eba78e581759e1f0d3c82362b2ca217ed3f97f
183
+ rubocop-ast (1.38.0) sha256=4fdf6792fe443a9a18acb12dbc8225d0d64cd1654e41fedb30e79c18edbb26ae
184
+ rubocop-performance (1.23.1) sha256=f22f86a795f5e6a6180aac2c6fc172534b173a068d6ed3396d6460523e051b82
185
+ rubocop-rspec (3.4.0) sha256=8721c13b6a8c9530a7ac481cea9423022f946fcf72428bda8289f8b57e4d4885
186
+ ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
187
+ runger_release_assistant (2.0.0)
188
+ runger_style (4.3.0) sha256=543c2414626d9084fef8fd057bf561c702e395f35e7af4ee6ee403276cf60614
189
+ securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
190
+ slop (4.10.1) sha256=844322b5ffcf17ed4815fdb173b04a20dd82b4fd93e3744c88c8fafea696d9c7
191
+ stringio (3.1.2) sha256=204f1828f85cdb39d57cac4abc6dc44b04505a223f131587f2e20ae3729ba131
192
+ tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
193
+ unicode-display_width (3.1.4) sha256=8caf2af1c0f2f07ec89ef9e18c7d88c2790e217c482bfc78aaa65eadd5415ac1
194
+ unicode-emoji (4.0.4) sha256=2c2c4ef7f353e5809497126285a50b23056cc6e61b64433764a35eff6c36532a
195
+ uri (1.0.2) sha256=b303504ceb7e5905771fa7fa14b649652fa949df18b5880d69cfb12494791e27
196
+
117
197
  RUBY VERSION
118
198
  ruby 3.4.1p0
119
199
 
data/README.md CHANGED
@@ -5,11 +5,8 @@
5
5
  This is a CLI tool that I (David Runger) use to automate the release of new gem
6
6
  versions via git/GitHub and (optionally) via RubyGems.
7
7
 
8
- **I do not recommend this gem for general use.**
9
-
10
8
  <!--ts-->
11
9
  * [runger_release_assistant](#runger_release_assistant)
12
- * [Not recommended for general use!](#not-recommended-for-general-use)
13
10
  * [Dependencies](#dependencies)
14
11
  * [Installation](#installation)
15
12
  * [Global installation](#global-installation)
@@ -18,30 +15,17 @@ versions via git/GitHub and (optionally) via RubyGems.
18
15
  * [Basic usage](#basic-usage)
19
16
  * [Available options and examples](#available-options-and-examples)
20
17
  * [Config](#config)
18
+ * [Post-release command](#post-release-command)
21
19
  * [Using with RubyGems](#using-with-rubygems)
22
20
  * [Development](#development)
23
21
  * [Contributing](#contributing)
24
22
  * [License](#license)
25
23
 
26
24
  <!-- Created by https://github.com/ekalinin/github-markdown-toc -->
27
- <!-- Added by: david, at: Tue Jul 23 12:46:01 AM CDT 2024 -->
25
+ <!-- Added by: david, at: Wed Feb 5 04:11:40 AM CST 2025 -->
28
26
 
29
27
  <!--te-->
30
28
 
31
- ## Not recommended for general use!
32
-
33
- This gem is somewhat customized and built specifically for my (David Runger's)
34
- custom and idiosyncratic workflow. For example, after releasing, this gem will
35
- automatically execute a `safe` command, if one is present on the machine. You
36
- might not want this behavior (if you have a `safe` command that you _don't_ want
37
- to be invoked after a release).
38
-
39
- Realistically speaking, though, this gem actually probably could be used by
40
- anyone, since most of this gem's functionality actually is built in a
41
- generalized way that I think won't conflict with most other people's workflows,
42
- but, still, I'm guessing that there are other, better tools available, anyway,
43
- and, so, on net, I just wouldn't recommend that others use this gem.
44
-
45
29
  ## Dependencies
46
30
 
47
31
  This gem assumes that you have `git` installed.
@@ -142,6 +126,10 @@ automatically detect as the "primary branch" any one of the following: `main`,
142
126
  and if you also want `git: true` and `rubygems: false`, then you don't need to
143
127
  create a config file.
144
128
 
129
+ ## Post-release command
130
+
131
+ If you specify a `post-release-command` in your `~/code/dotfiles` [`runger-config`](https://github.com/davidrunger/dotfiles/blob/cd02495fb2ad742cc1e85cc65aea5ff711485981/crystal-programs/runger-config.cr), then `runger_release_assistant` will execute that command after a successful release.
132
+
145
133
  ## Using with RubyGems
146
134
 
147
135
  By default, `runger_release_assistant` assumes that you only want to "release" your gem via GitHub. If
@@ -4,5 +4,6 @@ set -euo pipefail # exit on any error, don't allow undefined variables, pipes do
4
4
 
5
5
  lint gitleaks
6
6
 
7
+ background-and-notify lint newlines
7
8
  background-and-notify lint rubocop
8
9
  background-and-notify lint shellcheck
@@ -2,6 +2,6 @@
2
2
 
3
3
  # rubocop:disable Style/StaticClass
4
4
  class RungerReleaseAssistant
5
- VERSION = '0.14.0'
5
+ VERSION = '2.0.0'
6
6
  end
7
7
  # rubocop:enable Style/StaticClass
@@ -63,9 +63,9 @@ class RungerReleaseAssistant
63
63
  def logger
64
64
  Logger.new($stdout).tap do |logger|
65
65
  logger.formatter =
66
- ->(_severity, _datetime, _progname, msg) {
66
+ ->(_severity, _datetime, _progname, msg) do
67
67
  "[runger_release_assistant] #{msg}\n"
68
- }
68
+ end
69
69
  logger.level = @options[:debug] ? Logger::DEBUG : Logger::INFO
70
70
  end
71
71
  end
@@ -75,8 +75,6 @@ class RungerReleaseAssistant
75
75
  print_release_info
76
76
  confirm_release_looks_good
77
77
  verify_repository_cleanliness
78
- remember_initial_branch
79
- switch_to_main
80
78
 
81
79
  update_changelog_for_release
82
80
  update_version_file(next_version)
@@ -98,8 +96,7 @@ class RungerReleaseAssistant
98
96
  ERROR_LOG
99
97
  restore_and_abort(exit_code: 1)
100
98
  else
101
- run_safe_command
102
- switch_to_initial_branch
99
+ run_post_release_command
103
100
  end
104
101
 
105
102
  private
@@ -147,18 +144,10 @@ class RungerReleaseAssistant
147
144
  fail 'There are staged changes!' if !system('git diff-index --quiet --cached HEAD')
148
145
  end
149
146
 
150
- def remember_initial_branch
151
- @initial_branch = current_branch
152
- end
153
-
154
147
  def current_branch
155
148
  system_output('git branch --show-current')
156
149
  end
157
150
 
158
- def switch_to_main
159
- execute_command("git checkout #{primary_branch}")
160
- end
161
-
162
151
  memo_wise \
163
152
  def primary_branch
164
153
  @options[:primary_branch] ||
@@ -228,14 +217,14 @@ class RungerReleaseAssistant
228
217
  execute_command('bundle exec rake release', show_system_output: true)
229
218
  end
230
219
 
231
- def run_safe_command
232
- if system('which safe')
233
- execute_command('safe', clear_bundler_context: true)
234
- end
235
- end
220
+ def run_post_release_command
221
+ post_release_command_query_command =
222
+ 'runger-config --directory ~/code/dotfiles post-release-command'
236
223
 
237
- def switch_to_initial_branch
238
- execute_command("git checkout #{@initial_branch}") if @initial_branch
224
+ if system("#{post_release_command_query_command} --silent")
225
+ post_release_command = `#{post_release_command_query_command}`.rstrip
226
+ execute_command(post_release_command, clear_bundler_context: true)
227
+ end
239
228
  end
240
229
 
241
230
  def system_output(command)
@@ -280,7 +269,6 @@ class RungerReleaseAssistant
280
269
  execute_command("git checkout Gemfile.lock #{changelog_path} #{version_file_path}")
281
270
  end
282
271
 
283
- switch_to_initial_branch
284
272
  exit(exit_code)
285
273
  end
286
274
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runger_release_assistant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Runger
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2024-12-31 00:00:00.000000000 Z
10
+ date: 2025-02-05 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activesupport