runger_release_assistant 1.0.0 → 2.0.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: fb84a2deca6ff838d1daae768c394bc0bb90e720f78852689ed1915714eb4d3b
4
- data.tar.gz: 6db7e0ebc1ed0239584f5ea89ddefa9c9b051b169005a079033d6a34ab221c4b
3
+ metadata.gz: 7c64fb43dfbe91b1c74a31ca9be643acbd962066cf88af3b15eac5f015cbafdf
4
+ data.tar.gz: d3c9c7be04b2090ec11b2e1b8d921d290016a482dbcffaec6736f842b49ad301
5
5
  SHA512:
6
- metadata.gz: ef38b536bd49bfa2cf09cccf3217f9d4ffcbe661d598abeada58a2de273a91499e9bb605e50424132943ff399515e847e937dd9c2cccc514575bd4b6113a7061
7
- data.tar.gz: 219343ffdd17e7c48882bf296bcfdf71f54ded9c32320e062eab534343db0dc331cd83a4475dd4b376102048a432ff3fc594c465ff9a5b2720e67cb4c0e31225
6
+ metadata.gz: 99766ce92a2d6d84f062cc10c894ac2fd907eb69a68bf5b4c67804dae349d42c65adae287a92a6d43364668d4ade008bd662df19bdebd766d594be62a160b95c
7
+ data.tar.gz: 4401ed53ff4dffa618da6739583597691d31063a1cdb4364ecb086e6444b9d33e73abab77355561d3e75e61c60c44db42ab3d4db581b68825a7d4de09b145e28
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.1
1
+ 3.4.2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v2.0.1 (2025-03-19)
2
+ - Add `rake` as a dependency.
3
+
4
+ ## v2.0.0 (2025-02-05)
5
+ - **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).
6
+
1
7
  ## v1.0.0 (2025-01-29)
2
8
  - **BREAKING:** Run `main` (not `safe`) after releasing.
3
9
 
data/Gemfile CHANGED
@@ -9,7 +9,8 @@ gemspec
9
9
  group :development, :test do
10
10
  gem 'bundler', require: false
11
11
  gem 'pry'
12
- gem 'pry-byebug'
12
+ # Go back to upstream if/when https://github.com/deivid-rodriguez/pry-byebug/pull/ 428 is merged.
13
+ gem 'pry-byebug', github: 'davidrunger/pry-byebug'
13
14
  gem 'rake', require: false
14
15
  gem 'rspec', require: false
15
16
  gem 'rubocop', require: false
data/Gemfile.lock CHANGED
@@ -1,16 +1,25 @@
1
+ GIT
2
+ remote: https://github.com/davidrunger/pry-byebug.git
3
+ revision: 4ef3e66233451fcbeff3a5f7a616380214379272
4
+ specs:
5
+ pry-byebug (3.10.1)
6
+ pry (>= 0.13)
7
+ runger_byebug (>= 11.0)
8
+
1
9
  PATH
2
10
  remote: .
3
11
  specs:
4
- runger_release_assistant (1.0.0)
12
+ runger_release_assistant (2.0.1)
5
13
  activesupport (>= 6)
6
14
  memo_wise (>= 1.7)
7
15
  rainbow (>= 3.0)
16
+ rake (>= 13.2.1)
8
17
  slop (~> 4.8)
9
18
 
10
19
  GEM
11
20
  remote: https://rubygems.org/
12
21
  specs:
13
- activesupport (8.0.1)
22
+ activesupport (8.0.2)
14
23
  base64
15
24
  benchmark (>= 0.3)
16
25
  bigdecimal
@@ -27,40 +36,53 @@ GEM
27
36
  base64 (0.2.0)
28
37
  benchmark (0.4.0)
29
38
  bigdecimal (3.1.9)
30
- byebug (11.1.3)
31
39
  coderay (1.1.3)
32
40
  concurrent-ruby (1.3.5)
33
41
  connection_pool (2.5.0)
34
- diff-lcs (1.5.1)
42
+ date (3.4.1)
43
+ diff-lcs (1.6.0)
35
44
  drb (2.2.1)
36
45
  i18n (1.14.7)
37
46
  concurrent-ruby (~> 1.0)
38
- json (2.9.1)
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)
52
+ json (2.10.2)
39
53
  language_server-protocol (3.17.0.4)
40
- logger (1.6.5)
41
- memo_wise (1.10.0)
54
+ lint_roller (1.1.0)
55
+ logger (1.6.6)
56
+ memo_wise (1.11.0)
42
57
  method_source (1.1.0)
43
- minitest (5.25.4)
58
+ minitest (5.25.5)
44
59
  parallel (1.26.3)
45
- parser (3.3.7.0)
60
+ parser (3.3.7.1)
46
61
  ast (~> 2.4.1)
47
62
  racc
48
- prism (1.3.0)
49
- pry (0.14.2)
63
+ pp (0.6.2)
64
+ prettyprint
65
+ prettyprint (0.2.0)
66
+ prism (1.4.0)
67
+ pry (0.15.2)
50
68
  coderay (~> 1.1)
51
69
  method_source (~> 1.0)
52
- pry-byebug (3.10.1)
53
- byebug (~> 11.0)
54
- pry (>= 0.13, < 0.15)
70
+ psych (5.2.3)
71
+ date
72
+ stringio
55
73
  racc (1.8.1)
56
74
  rainbow (3.1.1)
57
75
  rake (13.2.1)
76
+ rdoc (6.12.0)
77
+ psych (>= 4.0.0)
58
78
  regexp_parser (2.10.0)
79
+ reline (0.6.0)
80
+ io-console (~> 0.5)
59
81
  rspec (3.13.0)
60
82
  rspec-core (~> 3.13.0)
61
83
  rspec-expectations (~> 3.13.0)
62
84
  rspec-mocks (~> 3.13.0)
63
- rspec-core (3.13.2)
85
+ rspec-core (3.13.3)
64
86
  rspec-support (~> 3.13.0)
65
87
  rspec-expectations (3.13.3)
66
88
  diff-lcs (>= 1.2.0, < 2.0)
@@ -68,36 +90,43 @@ GEM
68
90
  rspec-mocks (3.13.2)
69
91
  diff-lcs (>= 1.2.0, < 2.0)
70
92
  rspec-support (~> 3.13.0)
71
- rspec-support (3.13.1)
72
- rubocop (1.71.0)
93
+ rspec-support (3.13.2)
94
+ rubocop (1.74.0)
73
95
  json (~> 2.3)
74
- language_server-protocol (>= 3.17.0)
96
+ language_server-protocol (~> 3.17.0.2)
97
+ lint_roller (~> 1.1.0)
75
98
  parallel (~> 1.10)
76
99
  parser (>= 3.3.0.2)
77
100
  rainbow (>= 2.2.2, < 4.0)
78
101
  regexp_parser (>= 2.9.3, < 3.0)
79
- rubocop-ast (>= 1.36.2, < 2.0)
102
+ rubocop-ast (>= 1.38.0, < 2.0)
80
103
  ruby-progressbar (~> 1.7)
81
104
  unicode-display_width (>= 2.4.0, < 4.0)
82
- rubocop-ast (1.38.0)
105
+ rubocop-ast (1.39.0)
83
106
  parser (>= 3.3.1.0)
84
- rubocop-performance (1.23.1)
85
- rubocop (>= 1.48.1, < 2.0)
86
- rubocop-ast (>= 1.31.1, < 2.0)
87
- rubocop-rspec (3.4.0)
88
- rubocop (~> 1.61)
107
+ rubocop-performance (1.24.0)
108
+ lint_roller (~> 1.1)
109
+ rubocop (>= 1.72.1, < 2.0)
110
+ rubocop-ast (>= 1.38.0, < 2.0)
111
+ rubocop-rspec (3.5.0)
112
+ lint_roller (~> 1.1)
113
+ rubocop (~> 1.72, >= 1.72.1)
89
114
  ruby-progressbar (1.13.0)
90
- runger_style (4.2.2)
115
+ runger_byebug (11.4.0)
116
+ irb
117
+ reline
118
+ runger_style (5.7.0)
91
119
  prism (>= 0.24.0)
92
- rubocop (>= 1.68.0)
120
+ rubocop (>= 1.72.0)
93
121
  securerandom (0.4.1)
94
122
  slop (4.10.1)
123
+ stringio (3.1.5)
95
124
  tzinfo (2.0.6)
96
125
  concurrent-ruby (~> 1.0)
97
126
  unicode-display_width (3.1.4)
98
127
  unicode-emoji (~> 4.0, >= 4.0.4)
99
128
  unicode-emoji (4.0.4)
100
- uri (1.0.2)
129
+ uri (1.0.3)
101
130
 
102
131
  PLATFORMS
103
132
  ruby
@@ -105,7 +134,7 @@ PLATFORMS
105
134
  DEPENDENCIES
106
135
  bundler
107
136
  pry
108
- pry-byebug
137
+ pry-byebug!
109
138
  rake
110
139
  rspec
111
140
  rubocop
@@ -115,54 +144,64 @@ DEPENDENCIES
115
144
  runger_style
116
145
 
117
146
  CHECKSUMS
118
- activesupport (8.0.1) sha256=fd5bc74641c24ac3541055c2879789198ff42adee3e39c2933289ba008912e37
147
+ activesupport (8.0.2) sha256=8565cddba31b900cdc17682fd66ecd020441e3eef320a9930285394e8c07a45e
119
148
  ast (2.4.2) sha256=1e280232e6a33754cde542bc5ef85520b74db2aac73ec14acef453784447cc12
120
149
  base64 (0.2.0) sha256=0f25e9b21a02a0cc0cea8ef92b2041035d39350946e8789c562b2d1a3da01507
121
150
  benchmark (0.4.0) sha256=0f12f8c495545e3710c3e4f0480f63f06b4c842cc94cec7f33a956f5180e874a
122
151
  bigdecimal (3.1.9) sha256=2ffc742031521ad69c2dfc815a98e426a230a3d22aeac1995826a75dabfad8cc
123
- byebug (11.1.3) sha256=2485944d2bb21283c593d562f9ae1019bf80002143cc3a255aaffd4e9cf4a35b
124
152
  coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
125
153
  concurrent-ruby (1.3.5) sha256=813b3e37aca6df2a21a3b9f1d497f8cbab24a2b94cab325bffe65ee0f6cbebc6
126
154
  connection_pool (2.5.0) sha256=233b92f8d38e038c1349ccea65dd3772727d669d6d2e71f9897c8bf5cd53ebfc
127
- diff-lcs (1.5.1) sha256=273223dfb40685548436d32b4733aa67351769c7dea621da7d9dd4813e63ddfe
155
+ date (3.4.1) sha256=bf268e14ef7158009bfeaec40b5fa3c7271906e88b196d958a89d4b408abe64f
156
+ diff-lcs (1.6.0) sha256=a1e7f7b272962f8fc769358ad00001b87cdcf32ba349d6c70c6b544613d2da2e
128
157
  drb (2.2.1) sha256=e9d472bf785f558b96b25358bae115646da0dbfd45107ad858b0bc0d935cb340
129
158
  i18n (1.14.7) sha256=ceba573f8138ff2c0915427f1fc5bdf4aa3ab8ae88c8ce255eb3ecf0a11a5d0f
130
- json (2.9.1) sha256=d2bdef4644052fad91c1785d48263756fe32fcac08b96a20bb15840e96550d11
159
+ io-console (0.8.0) sha256=cd6a9facbc69871d69b2cb8b926fc6ea7ef06f06e505e81a64f14a470fddefa2
160
+ irb (1.15.1) sha256=d9bca745ac4207a8b728a52b98b766ca909b86ff1a504bcde3d6f8c84faae890
161
+ json (2.10.2) sha256=34e0eada93022b2a0a3345bb0b5efddb6e9ff5be7c48e409cfb54ff8a36a8b06
131
162
  language_server-protocol (3.17.0.4) sha256=c484626478664fd13482d8180947c50a8590484b1258b99b7aedb3b69df89669
132
- logger (1.6.5) sha256=c3cfe56d01656490ddd103d38b8993d73d86296adebc5f58cefc9ec03741e56b
133
- memo_wise (1.10.0) sha256=ae40ff8e7799697ff5d59d739b8766f76be22eba69c7c8468edb42ab83c94c3f
163
+ lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
164
+ logger (1.6.6) sha256=dd618d24e637715472732e7eed02e33cfbdf56deaad225edd0f1f89d38024017
165
+ memo_wise (1.11.0) sha256=06ef23a1edb6b8ee4f37d950bba04836b437b4d1036e45d24c2fd2f25b5490c3
134
166
  method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
135
- minitest (5.25.4) sha256=9cf2cae25ac4dfc90c988ebc3b917f53c054978b673273da1bd20bcb0778f947
167
+ minitest (5.25.5) sha256=391b6c6cb43a4802bfb7c93af1ebe2ac66a210293f4a3fb7db36f2fc7dc2c756
136
168
  parallel (1.26.3) sha256=d86babb7a2b814be9f4b81587bf0b6ce2da7d45969fab24d8ae4bf2bb4d4c7ef
137
- parser (3.3.7.0) sha256=7449011771e3e7881297859b849de26a6f4fccd515bece9520a87e7d2116119b
138
- prism (1.3.0) sha256=b11620829831b1cb7e6c9b46c81ff8a6e36ccb3f888f164485eb7351f386273a
139
- pry (0.14.2) sha256=c4fe54efedaca1d351280b45b8849af363184696fcac1c72e0415f9bdac4334d
140
- pry-byebug (3.10.1) sha256=c8f975c32255bfdb29e151f5532130be64ff3d0042dc858d0907e849125581f8
169
+ parser (3.3.7.1) sha256=7dbe61618025519024ac72402a6677ead02099587a5538e84371b76659e6aca1
170
+ pp (0.6.2) sha256=947ec3120c6f92195f8ee8aa25a7b2c5297bb106d83b41baa02983686577b6ff
171
+ prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
172
+ prism (1.4.0) sha256=dc0e3e00e93160213dc2a65519d9002a4a1e7b962db57d444cf1a71565bb703e
173
+ pry (0.15.2) sha256=12d54b8640d3fa29c9211dd4ffb08f3fd8bf7a4fd9b5a73ce5b59c8709385b6b
174
+ pry-byebug (3.10.1)
175
+ psych (5.2.3) sha256=84a54bb952d14604fea22d99938348814678782f58b12648fcdfa4d2fce859ee
141
176
  racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
142
177
  rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
143
178
  rake (13.2.1) sha256=46cb38dae65d7d74b6020a4ac9d48afed8eb8149c040eccf0523bec91907059d
179
+ rdoc (6.12.0) sha256=7d6f706e070bffa5d18a448f24076cbfb34923a99c1eab842aa18e6ca69f56e0
144
180
  regexp_parser (2.10.0) sha256=cb6f0ddde88772cd64bff1dbbf68df66d376043fe2e66a9ef77fcb1b0c548c61
181
+ reline (0.6.0) sha256=57620375dcbe56ec09bac7192bfb7460c716bbf0054dc94345ecaa5438e539d2
145
182
  rspec (3.13.0) sha256=d490914ac1d5a5a64a0e1400c1d54ddd2a501324d703b8cfe83f458337bab993
146
- rspec-core (3.13.2) sha256=94fbda6e4738e478f1c7532b7cc241272fcdc8b9eac03a97338b1122e4573300
183
+ rspec-core (3.13.3) sha256=25136507f4f9cf2e8977a2851e64e438b4331646054e345998714108745cdfe4
147
184
  rspec-expectations (3.13.3) sha256=0e6b5af59b900147698ea0ff80456c4f2e69cac4394fbd392fbd1ca561f66c58
148
185
  rspec-mocks (3.13.2) sha256=2327335def0e1665325a9b617e3af9ae20272741d80ac550336309a7c59abdef
149
- rspec-support (3.13.1) sha256=48877d4f15b772b7538f3693c22225f2eda490ba65a0515c4e7cf6f2f17de70f
150
- rubocop (1.71.0) sha256=e19679efd447346ac476122313d3788ae23c38214790bcf660e984c747608bf0
151
- rubocop-ast (1.38.0) sha256=4fdf6792fe443a9a18acb12dbc8225d0d64cd1654e41fedb30e79c18edbb26ae
152
- rubocop-performance (1.23.1) sha256=f22f86a795f5e6a6180aac2c6fc172534b173a068d6ed3396d6460523e051b82
153
- rubocop-rspec (3.4.0) sha256=8721c13b6a8c9530a7ac481cea9423022f946fcf72428bda8289f8b57e4d4885
186
+ rspec-support (3.13.2) sha256=cea3a2463fd9b84b9dcc9685efd80ea701aa8f7b3decb3b3ce795ed67737dbec
187
+ rubocop (1.74.0) sha256=06138a35d7d11c963d5abc0148b355e3999007cb0225a619940db0e75521379b
188
+ rubocop-ast (1.39.0) sha256=b6ba0f677ceced033b81c69405ac8931f4963116c572b8da5e15a03619a8236c
189
+ rubocop-performance (1.24.0) sha256=e5bd39ff3e368395b9af886927cc37f5892f43db4bd6c8526594352d5b4440b5
190
+ rubocop-rspec (3.5.0) sha256=710c942fe1af884ba8eea75cbb8bdbb051929a2208880a6fc2e2dce1eed5304c
154
191
  ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
155
- runger_release_assistant (1.0.0)
156
- runger_style (4.2.2) sha256=23bb4c2b8875d79113f72179a7e4ad96bd5ecde8d7a54bd18f4e60c2ab65dd64
192
+ runger_byebug (11.4.0) sha256=569e22ba2215f57e7f69e145fcb63be401e29fcd312f7936d813e12d0c7bbee6
193
+ runger_release_assistant (2.0.1)
194
+ runger_style (5.7.0) sha256=200790f3998e0b924df17efc9d440ddec99508bae983ba2a63f42b80624762f0
157
195
  securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
158
196
  slop (4.10.1) sha256=844322b5ffcf17ed4815fdb173b04a20dd82b4fd93e3744c88c8fafea696d9c7
197
+ stringio (3.1.5) sha256=bca92461515a131535743bc81d5559fa1de7d80cff9a654d6c0af6f9f27e35c8
159
198
  tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
160
199
  unicode-display_width (3.1.4) sha256=8caf2af1c0f2f07ec89ef9e18c7d88c2790e217c482bfc78aaa65eadd5415ac1
161
200
  unicode-emoji (4.0.4) sha256=2c2c4ef7f353e5809497126285a50b23056cc6e61b64433764a35eff6c36532a
162
- uri (1.0.2) sha256=b303504ceb7e5905771fa7fa14b649652fa949df18b5880d69cfb12494791e27
201
+ uri (1.0.3) sha256=e9f2244608eea2f7bc357d954c65c910ce0399ca5e18a7a29207ac22d8767011
163
202
 
164
203
  RUBY VERSION
165
- ruby 3.4.1p0
204
+ ruby 3.4.2p28
166
205
 
167
206
  BUNDLED WITH
168
- 2.6.2
207
+ 2.6.3
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 `main` command, if one is present on the machine. You
36
- might not want this behavior (if you have a `main` 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
@@ -2,6 +2,6 @@
2
2
 
3
3
  # rubocop:disable Style/StaticClass
4
4
  class RungerReleaseAssistant
5
- VERSION = '1.0.0'
5
+ VERSION = '2.0.1'
6
6
  end
7
7
  # rubocop:enable Style/StaticClass
@@ -7,7 +7,7 @@ class RungerReleaseAssistant::VersionCalculator
7
7
  @current_version = current_version
8
8
  end
9
9
 
10
- # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
10
+ # rubocop:disable Metrics/PerceivedComplexity
11
11
  def increment_for(type)
12
12
  new_parts =
13
13
  case type
@@ -38,7 +38,7 @@ class RungerReleaseAssistant::VersionCalculator
38
38
  end
39
39
  new_parts.map(&:to_s).join('.')
40
40
  end
41
- # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
41
+ # rubocop:enable Metrics/PerceivedComplexity
42
42
 
43
43
  private
44
44
 
@@ -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_main_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_main_command
232
- if system('which main')
233
- execute_command('main', 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
 
@@ -37,6 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.add_dependency('activesupport', '>= 6')
38
38
  spec.add_dependency('memo_wise', '>= 1.7')
39
39
  spec.add_dependency('rainbow', '>= 3.0')
40
+ spec.add_dependency('rake', '>= 13.2.1')
40
41
  spec.add_dependency('slop', '~> 4.8')
41
42
 
42
43
  required_ruby_version = File.read('.ruby-version').rstrip.sub(/\A(\d+\.\d+)\.\d+\z/, '\1.0')
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: 1.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Runger
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-01-30 00:00:00.000000000 Z
10
+ date: 2025-03-19 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activesupport
@@ -51,6 +51,20 @@ dependencies:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: '3.0'
54
+ - !ruby/object:Gem::Dependency
55
+ name: rake
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 13.2.1
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: 13.2.1
54
68
  - !ruby/object:Gem::Dependency
55
69
  name: slop
56
70
  requirement: !ruby/object:Gem::Requirement
@@ -123,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
137
  - !ruby/object:Gem::Version
124
138
  version: '0'
125
139
  requirements: []
126
- rubygems_version: 3.6.2
140
+ rubygems_version: 3.6.3
127
141
  specification_version: 4
128
142
  summary: A gem / CLI tool to automate the release process of other gems
129
143
  test_files: []