create_github_release 1.0.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -1
  3. data/.solargraph.yml +23 -0
  4. data/.vscode/launch.json +19 -0
  5. data/.yardopts +1 -0
  6. data/CHANGELOG.md +26 -0
  7. data/README.md +165 -47
  8. data/Rakefile +7 -4
  9. data/create_github_release.gemspec +7 -4
  10. data/exe/create-github-release +5 -1
  11. data/lib/create_github_release/assertion_base.rb +0 -2
  12. data/lib/create_github_release/assertions/bundle_is_up_to_date.rb +1 -1
  13. data/lib/create_github_release/assertions/gh_authenticated.rb +1 -1
  14. data/lib/create_github_release/assertions/gh_command_exists.rb +1 -1
  15. data/lib/create_github_release/assertions/git_command_exists.rb +1 -1
  16. data/lib/create_github_release/assertions/in_git_repo.rb +1 -1
  17. data/lib/create_github_release/assertions/in_repo_root_directory.rb +1 -1
  18. data/lib/create_github_release/assertions/local_and_remote_on_same_commit.rb +1 -1
  19. data/lib/create_github_release/assertions/local_release_branch_does_not_exist.rb +1 -1
  20. data/lib/create_github_release/assertions/no_staged_changes.rb +1 -1
  21. data/lib/create_github_release/assertions/no_uncommitted_changes.rb +1 -1
  22. data/lib/create_github_release/assertions/on_default_branch.rb +1 -1
  23. data/lib/create_github_release/assertions/remote_release_branch_does_not_exist.rb +1 -1
  24. data/lib/create_github_release/assertions/remote_release_tag_does_not_exist.rb +1 -1
  25. data/lib/create_github_release/command_line/options.rb +151 -0
  26. data/lib/create_github_release/command_line/parser.rb +253 -0
  27. data/lib/create_github_release/command_line/validations.rb +293 -0
  28. data/lib/create_github_release/command_line/validator.rb +93 -0
  29. data/lib/create_github_release/command_line.rb +43 -0
  30. data/lib/create_github_release/project.rb +136 -76
  31. data/lib/create_github_release/release_assertions.rb +2 -1
  32. data/lib/create_github_release/release_tasks.rb +2 -1
  33. data/lib/create_github_release/tasks/commit_release.rb +1 -1
  34. data/lib/create_github_release/tasks/create_github_release.rb +1 -1
  35. data/lib/create_github_release/tasks/create_release_branch.rb +1 -1
  36. data/lib/create_github_release/tasks/create_release_pull_request.rb +1 -1
  37. data/lib/create_github_release/tasks/create_release_tag.rb +1 -1
  38. data/lib/create_github_release/tasks/push_release.rb +1 -1
  39. data/lib/create_github_release/tasks/update_changelog.rb +1 -1
  40. data/lib/create_github_release/tasks/update_version.rb +13 -14
  41. data/lib/create_github_release/version.rb +1 -1
  42. data/lib/create_github_release.rb +1 -2
  43. metadata +31 -25
  44. data/lib/create_github_release/command_line_options.rb +0 -367
  45. data/lib/create_github_release/command_line_parser.rb +0 -225
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7feefb0f3ef554c8aea3c693cdbbed30aab587be5dc44631101898caadfa658
4
- data.tar.gz: d342cd8c38e03ca012d5b70daf832642a7434c647d4466d9cd0969e9f4278926
3
+ metadata.gz: 046642a7818c8cf626e29d484eede363e25b9ab591ce134f2746fc18a4fa64f5
4
+ data.tar.gz: 6e652ca442a87c6160b029c388df237089e5e607de06f10fd388a2f9d84296ad
5
5
  SHA512:
6
- metadata.gz: 122c8e2198ceb28fa9e429f851e7c6d821cadc71fb5a3ade6749c520d1ae7d427159f7059e1455a3a2b15294d8e1125e75451d4d1996fceef63f07e7b88b4ffb
7
- data.tar.gz: e6d1a7abe65328fc51161458934709b9ae3e747573398f4ef71bcdfad4023f865b76ebd6836fe7622183a90909da9498ca6ec30b29deac89d9608b0a225e8d7d
6
+ metadata.gz: 24d892f156b5a01589f39822fb544475d7e14bf71aa864be551edc028422ddac3c12909aff95cca9bdb1ad92147e3d2f1b3dedc80435b6545d069245e3353cc4
7
+ data.tar.gz: dd56d32c64689bee2b44b4178f6c2b5ee324c540417b7e254e20b07f6aa856817b2dac65e97ec7aa29b960de786c9aba10eb1f3c3f755ae2a704287f1a0ad9ed
data/.rubocop.yml CHANGED
@@ -7,7 +7,7 @@ AllCops:
7
7
  SuggestExtensions: false
8
8
  # RuboCop enforces rules depending on the oldest version of Ruby which
9
9
  # your project supports:
10
- TargetRubyVersion: 2.7
10
+ TargetRubyVersion: 3.0
11
11
 
12
12
  # The default max line length is 80 characters
13
13
  Layout/LineLength:
@@ -18,3 +18,6 @@ Metrics/BlockLength:
18
18
  Exclude:
19
19
  - "spec/**/*_spec.rb"
20
20
  - "*.gemspec"
21
+
22
+ Gemspec/DevelopmentDependencies:
23
+ EnforcedStyle: gemspec
data/.solargraph.yml ADDED
@@ -0,0 +1,23 @@
1
+ ---
2
+ include:
3
+ - "**/*.rb"
4
+ exclude:
5
+ - spec/**/*
6
+ - test/**/*
7
+ - vendor/**/*
8
+ - ".bundle/**/*"
9
+ require: []
10
+ domains: []
11
+ reporters:
12
+ - rubocop
13
+ - require_not_found
14
+ - typecheck:strict
15
+ formatter:
16
+ rubocop:
17
+ cops: safe
18
+ except: []
19
+ only: []
20
+ extra_args: []
21
+ require_paths: []
22
+ plugins: []
23
+ max_files: 5000
@@ -0,0 +1,19 @@
1
+ {
2
+ // Test
3
+ "version": "0.2.0",
4
+ "configurations": [
5
+ {
6
+ "type": "rdbg",
7
+ "name": "Debug current file with rdbg",
8
+ "request": "launch",
9
+ "script": "${file}",
10
+ "args": [],
11
+ "askParameters": false
12
+ },
13
+ {
14
+ "type": "rdbg",
15
+ "name": "Attach with rdbg",
16
+ "request": "attach"
17
+ }
18
+ ]
19
+ }
data/.yardopts CHANGED
@@ -2,4 +2,5 @@
2
2
  --hide-void-return
3
3
  --markup-provider=redcarpet
4
4
  --markup markdown
5
+ - CHANGELOG.md
5
6
  - LICENSE.txt
data/CHANGELOG.md CHANGED
@@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## v1.2.0 (2024-01-07)
9
+
10
+ [Full Changelog](https://github.com/main-branch/create_github_release/compare/v1.1.0..v1.2.0)
11
+
12
+ Changes since v1.1.0:
13
+
14
+ * 80da449 Add support for pre-release versions (#43)
15
+
16
+ ## v1.1.0 (2023-10-15)
17
+
18
+ [Full Changelog](https://github.com/main-branch/create_github_release/compare/v1.0.0..v1.1.0)
19
+
20
+ Changes since v1.0.0:
21
+
22
+ * 5088cd0 Add instruction for publishing the resulting gem (#41)
23
+ * 60553b0 Integrate solargraph:typecheck into Rake and fix any problems (#40)
24
+ * c0dd2d8 Improve reporting of code not covered by tests (#38)
25
+ * 5dff0b5 Tell rubocop development dependencies go in the gemspec (#39)
26
+ * d55f2f4 Merge pull request #37 from main-branch/debugging_support
27
+ * 4a28c4c Allow the build to continue if the Ruby head build fails
28
+ * 2814761 Add launch.json to run the ruby debugger in VS Code
29
+ * c3de36d Require 'debug' in spec_helper so `binding.break` can be used
30
+ * 3f3276d Add gems needed for debugging
31
+ * e299d97 Replace 'bump' with 'semverify' (#35)
32
+ * 68fa672 Drop support for Ruby 2.7 and require at least Ruby 3.0 (#36)
33
+
8
34
  ## v1.0.0 (2023-02-05)
9
35
 
10
36
  [Full Changelog](https://github.com/main-branch/create_github_release/compare/v0.3.0..v1.0.0)
data/README.md CHANGED
@@ -5,34 +5,46 @@
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/b8c0af10b15a0ffeb1a1/maintainability)](https://codeclimate.com/github/main-branch/create_github_release/maintainability)
6
6
  [![Test Coverage](https://api.codeclimate.com/v1/badges/b8c0af10b15a0ffeb1a1/test_coverage)](https://codeclimate.com/github/main-branch/create_github_release/test_coverage)
7
7
 
8
- A script to manage your gem version and create a GitHub branch, PR, and release
9
- for a new gem version.
10
-
11
- Since this script builds a changelog by listing the commits on the default branch,
12
- it works best if you are disciplined about squashing PR commits to the
13
- minimum number of commits necessary (usually one) in order to avoid a noisy changelog.
14
-
15
- Tested on Ruby 2.7+
16
-
17
- * [The create\_github\_release Gem](#the-create_github_release-gem)
18
- * [Installation](#installation)
19
- * [Usage](#usage)
20
- * [First release using this script when there were NO prior releases](#first-release-using-this-script-when-there-were-no-prior-releases)
21
- * [First release using this script when there were prior releases](#first-release-using-this-script-when-there-were-prior-releases)
22
- * [Subsequent releases using this script](#subsequent-releases-using-this-script)
8
+ When run in your gem's git worktree, the `create-github-release` script does the
9
+ following:
10
+
11
+ * bumps the gem's version following SemVer,
12
+ * updates the gems's changelog,
13
+ * creates a new release branch and release tag,
14
+ * commits the version and changelog changes to the release branch,
15
+ * pushes these changes to GitHub and creates a PR to merge the release branch to the
16
+ default branch
17
+
18
+ Since this script builds a changelog by listing the commits since the last release, it
19
+ works best if you are disciplined about squashing PR commits to the minimum number of
20
+ commits necessary (usually one) in order to avoid a noisy changelog.
21
+
22
+ Tested on Ruby 3.0+
23
+
24
+ * [Installation](#installation)
25
+ * [Usage](#usage)
26
+ * [First release using this script when there were NO prior releases](#first-release-using-this-script-when-there-were-no-prior-releases)
27
+ * [First release using this script when there were prior releases](#first-release-using-this-script-when-there-were-prior-releases)
28
+ * [Subsequent releases using this script](#subsequent-releases-using-this-script)
29
+ * [Pre-release versions](#pre-release-versions)
30
+ * [Creating the first pre-release version for a release](#creating-the-first-pre-release-version-for-a-release)
31
+ * [Creating subsequent pre-releases](#creating-subsequent-pre-releases)
32
+ * [Changing the pre-release type](#changing-the-pre-release-type)
33
+ * [Creating the release after pre-releases](#creating-the-release-after-pre-releases)
23
34
  * [After Running create-github-release](#after-running-create-github-release)
24
- * [How the changelog is updated](#how-the-changelog-is-updated)
25
- * [Limitations](#limitations)
26
- * [Development](#development)
27
- * [Contributing](#contributing)
28
- * [License](#license)
35
+ * [FAQ](#faq)
36
+ * [What if I want to reverse the changes made by this script?](#what-if-i-want-to-reverse-the-changes-made-by-this-script)
37
+ * [How is the changelog updated?](#how-is-the-changelog-updated)
38
+ * [Development](#development)
39
+ * [Contributing](#contributing)
40
+ * [License](#license)
29
41
 
30
42
  ## Installation
31
43
 
32
44
  Add `create_github_release` as a development dependency in your project's gemspec:
33
45
 
34
46
  ```ruby
35
- spec.add_development_dependency 'create_github_release', '~> 0.1'
47
+ spec.add_development_dependency 'create_github_release'
36
48
  ```
37
49
 
38
50
  and then install using `bundle update`.
@@ -45,16 +57,18 @@ This gem installs the `create-guthub-release` command line tool:
45
57
  Usage:
46
58
  create-github-release --help | RELEASE_TYPE [options]
47
59
 
48
- RELEASE_TYPE must be 'major', 'minor', 'patch', or 'first'
60
+ RELEASE_TYPE must be 'major', 'minor', 'patch', 'pre', 'release', or 'first'
49
61
 
50
62
  Options:
51
63
  --default-branch=BRANCH_NAME Override the default branch
52
64
  --release-branch=BRANCH_NAME Override the release branch to create
65
+ -p, --pre Create a pre-release
66
+ -t, --pre-type=TYPE Type of pre-release to create (e.g. alpha, beta, etc.)
53
67
  --remote=REMOTE_NAME Use this remote name instead of 'origin'
54
68
  --last-release-version=VERSION
55
- Use this version instead `bump current`
69
+ Use this version instead `semverify current`
56
70
  --next-release-version=VERSION
57
- Use this version instead `bump RELEASE_TYPE`
71
+ Use this version instead `semverify next-RELEASE_TYPE`
58
72
  --changelog-path=PATH Use this file instead of CHANGELOG.md
59
73
  -q, --[no-]quiet Do not show output
60
74
  -v, --[no-]verbose Show extra output
@@ -76,10 +90,10 @@ If this is to be the first release of this gem follow these instructions.
76
90
  For this use case, let's assume the following:
77
91
 
78
92
  * the default branch is `main` (this is the HEAD branch returned by `git remote show origin`)
79
- * the current version of the gem is `0.1.0` (as returned by `bump current`)
93
+ * the current version of the gem is `0.1.0` (as returned by `semverify current`)
80
94
 
81
95
  If a different first version number is desired, update the version number in the
82
- source code making sure that `bump current` returns the desired version number.
96
+ source code making sure that `semverify current` returns the desired version number.
83
97
  Then commit the change to the default branch on the remote before running this
84
98
  script.
85
99
 
@@ -117,7 +131,7 @@ create-github-release first
117
131
 
118
132
  The `create-github-release` script will do the following:
119
133
 
120
- * Determine the next-release version (`v0.1.0`) using `bump current`
134
+ * Determine the next-release version (`v0.1.0`) using `semverify current`
121
135
  * Update the project's changelog file `CHANGELOG.md`
122
136
  * Create a release branch `release-v0.1.0`
123
137
  * Commit the changes to the changelog and create a release tag (`v0.1.0`) pointing
@@ -134,7 +148,7 @@ In order to start using `create-github-release` after you have used some other
134
148
  method for managing the gem version and creating releases, you need to ensure the
135
149
  following prerequisites are met:
136
150
 
137
- 1. that `bump current` is the version of the last release (let's use `1.3.1` as an
151
+ 1. that `semverify current` is the version of the last release (let's use `1.3.1` as an
138
152
  example).
139
153
  2. that there is a corresponding release tag that points to the last commit on the
140
154
  default branch of the previous release. If the last version was `1.3.1`, then
@@ -159,7 +173,7 @@ For this use case, let's assume the following:
159
173
 
160
174
  * you want to create a `major` release
161
175
  * the default branch is `main` (this is the HEAD branch returned by `git remote show origin`)
162
- * the current version of the gem is `0.1.0` (as returned by `bump current`)
176
+ * the current version of the gem is `0.1.0` (as returned by `semverify current`)
163
177
 
164
178
  The following prerequisites must be met:
165
179
 
@@ -182,9 +196,9 @@ create-github-release major
182
196
 
183
197
  The `create-github-release` script will do the following:
184
198
 
185
- * Determine the last-release version using `bump current`
186
- * Determine the next-release version using `bump show-next RELEASE_TYPE`
187
- * Bump the project's version using `bump RELEASE_TYPE`
199
+ * Determine the last-release version using `semverify current`
200
+ * Determine the next-release version using `semverify RELEASE_TYPE --dry-run`
201
+ * Increment the project's version using `semverify RELEASE_TYPE`
188
202
  * Update the project's changelog file `CHANGELOG.md`
189
203
  * Create a release branch `release-v1.0.0`
190
204
  * Commit the changes to the version and changelog AND create a release tag (`v1.0.0`) pointing
@@ -195,7 +209,85 @@ The `create-github-release` script will do the following:
195
209
  See [After running create-github-release](#after-running-create-github-release)
196
210
  for instructions for completing your release.
197
211
 
198
- ## After Running create-github-release
212
+ ### Pre-release versions
213
+
214
+ This gem allows creation of a release with a pre-release version as [defined in the
215
+ Semver 2.0.0 spec](https://semver.org/#spec-item-9). An example of a pre-release
216
+ version is `1.0.0-beta.1`.
217
+
218
+ Pre-release versions have a lower precedence than their associated normal version.
219
+ This means the pre-release version sorts before the associated release version. For
220
+ example, `1.0.0-beta.1` comes before `1.0.0`. A pre-release version indicates that
221
+ the version is unstable and might not yet satisfy the intended compatibility
222
+ requirements as denoted by its associated normal version
223
+
224
+ This gem limits pre-release versions to the form `MAJOR.MINOR.PATCH-PRERELEASE` where
225
+ `PRERELEASE` can ONLY have the following form: `TYPE.DIGITS`. `TYPE` is any text
226
+ string allowed in the Semver 2.0.0 spec and is typically 'alpha', 'beta', 'pre',
227
+ 'rc', etc. `DIGITS` is a numeric identifier that does not include leading zeroes.
228
+
229
+ #### Creating the first pre-release version for a release
230
+
231
+ Let's say that:
232
+ * The current release version is `1.3.4`
233
+ * You want to create the first pre-release for the next MINOR release
234
+ * You want the pre-release TYPE to be 'alpha'
235
+
236
+ You would use the following command:
237
+
238
+ ```shell
239
+ create-github-release minor --pre --pre-type=alpha
240
+ ```
241
+
242
+ This would create a release whose version is `1.4.0-alpha.1`.
243
+
244
+ #### Creating subsequent pre-releases
245
+
246
+ Let's say you would like to create another alpha pre-release for the `1.4.0` release.
247
+
248
+ You would use the following command:
249
+
250
+ ```shell
251
+ create-github-release pre
252
+ ```
253
+
254
+ This woould increment the pre-release numeric identifier giving the version is `1.4.0-alpha.2`.
255
+
256
+ It is only valid to use the `pre` command when the current release is a pre-release
257
+ version. For example, it would not be valid to run `create-github-release pre` if the
258
+ current version is `1.0.0`.
259
+
260
+ #### Changing the pre-release type
261
+
262
+ Continuing with the previous example where the current release version is
263
+ `1.4.0-alpha.2`, if you now you want to create a beta pre-release, you would use the
264
+ following command:
265
+
266
+ ```shell
267
+ create-github-release pre --pre-type=beta
268
+ ```
269
+
270
+ This would change the release type and reset the pre-release numeric identifier to
271
+ '1' resulting in the verion `1.4.0-beta.1`
272
+
273
+ Note that the current release type MUST be lexically less than the new release type
274
+ specified on the command line. This means that if the current version is
275
+ `1.4.0-beta.1`, it would not be valid to change the release type to `alpha` since
276
+ 'alpha' <= 'beta'.
277
+
278
+ #### Creating the release after pre-releases
279
+
280
+ Now let's say that the current version is `1.4.0-beta.1`. To create release whose version
281
+ is `1.4.0`, use the command:
282
+
283
+ ```shell
284
+ create-github-release release
285
+ ```
286
+
287
+ It is only valid to use the `release` command when the current release version is a
288
+ pre-release version.
289
+
290
+ ### After Running create-github-release
199
291
 
200
292
  If you want to make additional updates to the ChangeLog or make changes as
201
293
  part of the release PR, it is best to do them before running this script. If
@@ -216,15 +308,47 @@ git push
216
308
  ```
217
309
 
218
310
  GitHub will automatically close the PR after the `git push` command. These commands
219
- are output by `create-github-release` so you do not have to memorize them ;)
311
+ are output by `create-github-release` so you do not have to memorize them.
220
312
 
221
- It is important to use a fast foward marge to ensure that the release tag points
222
- to the right commit after the merge. GitHub does not allow fast forward merges when
223
- merging a PR.
313
+ It is important to use a fast foward merge to ensure that the release tag points to
314
+ the right commit after the merge. The GitHub UI does not allow fast forward merges
315
+ when merging a PR.
224
316
 
225
- Finally, publish your gem to rubygems.org with the `rake release` command.
317
+ Finally, publish your gem to rubygems.org with the command:
226
318
 
227
- ## How the changelog is updated
319
+ ```shell
320
+ rake release:rubygem_push
321
+ ```
322
+
323
+ ## FAQ
324
+
325
+ ### What if I want to reverse the changes made by this script?
326
+
327
+ You will need to delete the Git tag and branch created by this script both remotely and locally.
328
+
329
+ In your worktree run the following commands:
330
+
331
+ ```shell
332
+ DEFAULT_BRANCH=main
333
+ RELEASE_VERSION=1.0.1
334
+ RELEASE_TAG="v${RELEASE_VERSION}"
335
+ RELEASE_BRANCH="release_${RELEASE_TAG}"
336
+ REMOTE=origin
337
+
338
+ # Make sure the release branch is not checked out
339
+ git checkout "${DEFAULT_BRANCH}"
340
+
341
+ # Delete remote branch and tag
342
+ # Deleting the remote branch will automatically close the release PR
343
+ git push "${REMOTE}" --delete "${RELEASE_BRANCH}"
344
+ git push "${REMOTE}" --delete "${RELEASE_TAG}"
345
+
346
+ # Delete the local branch and tag
347
+ git branch -D "${RELEASE_BRANCH}"
348
+ git tag -D "${RELEASE_TAG}"
349
+ ```
350
+
351
+ ### How is the changelog updated?
228
352
 
229
353
  A release description is generated by listing the commits between the last release
230
354
  and the next release.
@@ -266,24 +390,18 @@ The resulting updated changelog file has the following sections:
266
390
  2. next release description
267
391
  3. body (including past release descriptions)
268
392
 
269
- ## Limitations
270
-
271
- * Does not work on Windows
272
- * Has only been tested on MRI Ruby
273
- *
274
-
275
393
  ## Development
276
394
 
277
395
  After checking out the repo, run `bin/setup` to install dependencies. Then, run
278
396
  `rake spec` to run the tests. You can also run `bin/console` for an interactive
279
397
  prompt that will allow you to experiment.
280
398
 
281
- To install this gem onto your local machine, run `bundle exec rake install`.
399
+ To install this gem onto your current Ruby environment, run `bundle exec rake install`.
282
400
 
283
401
  ## Contributing
284
402
 
285
403
  Bug reports and pull requests are welcome on
286
- [this project's GitHub issue tracker](https://github.com/main-branch/create_github_release)
404
+ [this project's GitHub page](https://github.com/main-branch/create_github_release)
287
405
 
288
406
  ## License
289
407
 
data/Rakefile CHANGED
@@ -26,10 +26,6 @@ end
26
26
  CLEAN << 'pkg'
27
27
  CLOBBER << 'Gemfile.lock'
28
28
 
29
- # Bump
30
-
31
- require 'bump/tasks'
32
-
33
29
  # RSpec
34
30
 
35
31
  require 'rspec/core/rake_task'
@@ -79,6 +75,13 @@ Yardstick::Rake::Verify.new(:'yard:coverage') do |verify|
79
75
  verify.threshold = 100
80
76
  end
81
77
 
78
+ # # Solargraph typecheck
79
+
80
+ # desc 'Run the solargraph type checker'
81
+ # task :'solargraph:typecheck' do
82
+ # sh 'bundle exec solargraph typecheck --level=typed'
83
+ # end
84
+
82
85
  # Additional cleanup
83
86
 
84
87
  CLEAN << 'tmp'
@@ -15,13 +15,14 @@ Gem::Specification.new do |spec|
15
15
  DESCRIPTION
16
16
  spec.homepage = 'https://github.com/main-branch/create_github_release'
17
17
  spec.license = 'MIT'
18
- spec.required_ruby_version = '>= 2.7.0'
18
+ spec.required_ruby_version = '>= 3.0.0'
19
19
 
20
20
  spec.metadata['allowed_push_host'] = 'https://rubygems.org'
21
21
 
22
22
  spec.metadata['homepage_uri'] = spec.homepage
23
23
  spec.metadata['source_code_uri'] = spec.homepage
24
- spec.metadata['changelog_uri'] = spec.homepage
24
+ spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md"
25
+ spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}"
25
26
 
26
27
  # Specify which files should be added to the gem when it is released.
27
28
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -34,15 +35,17 @@ Gem::Specification.new do |spec|
34
35
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
35
36
  spec.require_paths = ['lib']
36
37
 
37
- spec.add_development_dependency 'bump', '~> 0.10'
38
+ spec.add_runtime_dependency 'semverify', '~> 0.3'
39
+
38
40
  spec.add_development_dependency 'bundler-audit', '~> 0.9'
41
+ spec.add_development_dependency 'debug', '~> 1.7'
39
42
  spec.add_development_dependency 'rake', '~> 13.0'
40
43
  spec.add_development_dependency 'redcarpet', '~> 3.5'
41
44
  spec.add_development_dependency 'rspec', '~> 3.10'
42
45
  spec.add_development_dependency 'rubocop', '~> 1.36'
43
46
  spec.add_development_dependency 'simplecov', '~> 0.21'
44
47
  spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
45
- spec.add_development_dependency 'solargraph', '~> 0.47'
48
+ # spec.add_development_dependency 'solargraph', '~> 0.49'
46
49
  spec.add_development_dependency 'timecop', '~> 0.9'
47
50
  spec.add_development_dependency 'yard', '~> 0.9'
48
51
  spec.add_development_dependency 'yardstick', '~> 0.9'
@@ -3,7 +3,7 @@
3
3
 
4
4
  require 'create_github_release'
5
5
 
6
- options = CreateGithubRelease::CommandLineParser.new.parse(*ARGV)
6
+ options = CreateGithubRelease::CommandLine::Parser.new.parse(*ARGV)
7
7
  pp options if options.verbose
8
8
 
9
9
  project = CreateGithubRelease::Project.new(options)
@@ -23,4 +23,8 @@ puts <<~MESSAGE unless project.quiet
23
23
  git checkout #{project.default_branch}
24
24
  git merge --ff-only #{project.release_branch}
25
25
  git push
26
+
27
+ Wait for the CI build to pass and then release the gem with the following command:
28
+
29
+ rake release:rubygem_push
26
30
  MESSAGE
@@ -30,8 +30,6 @@ module CreateGithubRelease
30
30
  raise NotImplementedError
31
31
  end
32
32
 
33
- # @!attribute [r] options
34
- #
35
33
  # The project passed to the assertion object
36
34
  # @return [CreateGithubRelease::Project] the project to create a release for
37
35
  # @api private
@@ -17,7 +17,7 @@ module CreateGithubRelease
17
17
  # @example
18
18
  # require 'create_github_release'
19
19
  #
20
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
20
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
21
21
  # project = CreateGithubRelease::Project.new(options)
22
22
  # assertion = CreateGithubRelease::Assertions::BundleIsUpToDate.new(project)
23
23
  # begin
@@ -15,7 +15,7 @@ module CreateGithubRelease
15
15
  # @example
16
16
  # require 'create_github_release'
17
17
  #
18
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
18
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
19
19
  # project = CreateGithubRelease::Project.new(options)
20
20
  # assertion = CreateGithubRelease::Assertions::GhAuthenticated.new(project)
21
21
  # begin
@@ -15,7 +15,7 @@ module CreateGithubRelease
15
15
  # @example
16
16
  # require 'create_github_release'
17
17
  #
18
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
18
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
19
19
  # project = CreateGithubRelease::Project.new(options)
20
20
  # assertion = CreateGithubRelease::Assertions::GhCommandExists.new(project)
21
21
  # begin
@@ -15,7 +15,7 @@ module CreateGithubRelease
15
15
  # @example
16
16
  # require 'create_github_release'
17
17
  #
18
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
18
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
19
19
  # project = CreateGithubRelease::Project.new(options)
20
20
  # assertion = CreateGithubRelease::Assertions::GitCommandExists.new(project)
21
21
  # begin
@@ -17,7 +17,7 @@ module CreateGithubRelease
17
17
  # @example
18
18
  # require 'create_github_release'
19
19
  #
20
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
20
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
21
21
  # project = CreateGithubRelease::Project.new(options)
22
22
  # assertion = CreateGithubRelease::Assertions::InGitRepo.new(project)
23
23
  # begin
@@ -18,7 +18,7 @@ module CreateGithubRelease
18
18
  # @example
19
19
  # require 'create_github_release'
20
20
  #
21
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
21
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
22
22
  # project = CreateGithubRelease::Project.new(options)
23
23
  # assertion = CreateGithubRelease::Assertions::InRepoRootDirectory.new(project)
24
24
  # begin
@@ -17,7 +17,7 @@ module CreateGithubRelease
17
17
  # @example
18
18
  # require 'create_github_release'
19
19
  #
20
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
20
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
21
21
  # project = CreateGithubRelease::Project.new(options)
22
22
  # assertion = CreateGithubRelease::Assertions::LocalAndRemoteOnSameCommit.new(project)
23
23
  # begin
@@ -15,7 +15,7 @@ module CreateGithubRelease
15
15
  # @example
16
16
  # require 'create_github_release'
17
17
  #
18
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
18
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
19
19
  # project = CreateGithubRelease::Project.new(options)
20
20
  # assertion = CreateGithubRelease::Assertions::LocalReleaseBranchDoesNotExist.new(project)
21
21
  # begin
@@ -17,7 +17,7 @@ module CreateGithubRelease
17
17
  # @example
18
18
  # require 'create_github_release'
19
19
  #
20
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
20
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
21
21
  # project = CreateGithubRelease::Project.new(options)
22
22
  # assertion = CreateGithubRelease::Assertions::NoStagedChanges.new(project)
23
23
  # begin
@@ -17,7 +17,7 @@ module CreateGithubRelease
17
17
  # @example
18
18
  # require 'create_github_release'
19
19
  #
20
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
20
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
21
21
  # project = CreateGithubRelease::Project.new(options)
22
22
  # assertion = CreateGithubRelease::Assertions::NoUncommittedChanges.new(project)
23
23
  # begin
@@ -17,7 +17,7 @@ module CreateGithubRelease
17
17
  # @example
18
18
  # require 'create_github_release'
19
19
  #
20
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
20
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
21
21
  # project = CreateGithubRelease::Project.new(options)
22
22
  # assertion = CreateGithubRelease::Assertions::OnDefaultBranch.new(project)
23
23
  # begin
@@ -15,7 +15,7 @@ module CreateGithubRelease
15
15
  # @example
16
16
  # require 'create_github_release'
17
17
  #
18
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
18
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
19
19
  # project = CreateGithubRelease::Project.new(options)
20
20
  # assertion = CreateGithubRelease::Assertions::RemoteReleaseBranchDoesNotExist.new(project)
21
21
  # begin
@@ -15,7 +15,7 @@ module CreateGithubRelease
15
15
  # @example
16
16
  # require 'create_github_release'
17
17
  #
18
- # options = CreateGithubRelease::CommandLineOptions.new { |o| o.release_type = 'major' }
18
+ # options = CreateGithubRelease::CommandLine::Options.new { |o| o.release_type = 'major' }
19
19
  # project = CreateGithubRelease::Project.new(options)
20
20
  # assertion = CreateGithubRelease::Assertions::RemoteReleaseTagDoesNotExist.new(project)
21
21
  # begin