Skip to content

Commit 23c76b4

Browse files
authored
Update instructions for creating releases and updating the changelog (#8)
1 parent 479e281 commit 23c76b4

File tree

3 files changed

+36
-22
lines changed

3 files changed

+36
-22
lines changed

RELEASING.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,26 @@ and the new release version to be created is `1.1.0.pre1`.
1010

1111
## Prepare the release
1212

13-
From a fork of ruby_git, create a PR containing changes to (1) bump the
14-
version number, (2) update the CHANGELOG.md, and (3) tag the release.
15-
16-
* Bump the version number in lib/ruby_git/version.rb following [Semantic Versioning](https://semver.org)
17-
guidelines
18-
* Add a link in CHANGELOG.md to the release tag which will be created later
19-
in this guide
20-
* `git add` these changes to the index, but do not commit them.
21-
* Create a new tag using [git-extras](https://github.com/tj/git-extras/blob/main/Commands.md#git-release)
22-
`git release` command
23-
* For example: `git release v1.1.0.pre1`
24-
* This will create a commit for the tag and any changes in the index.
25-
* These should be the only changes in the PR
26-
* Get the PR reviewed, approved and merged to main.
13+
On a branch (or fork) of ruby_git, create a PR containing changes to (1) bump the
14+
version number and (2) update the CHANGELOG.md, and (3) tag the release.
15+
16+
* Bump the version number
17+
* Version number is in lib/ruby_git/version.rb
18+
* Follow [Semantic Versioning](https://semver.org) guidelines
19+
* `bundle exec bump patch` # bugfixes only
20+
* `bundle exec bump minor` # bugfixes only
21+
* `bundle exec bump major` # bugfixes only
22+
23+
* Update CHANGELOG.md
24+
* `bundle exec rake changelog`
25+
26+
* Stage the changes to be committed
27+
* `git add lib/ruby_git/version.rb CHANGELOG.md`
28+
29+
* Commit, tag, and push changes to the repository
30+
* ```git release `ruby -I lib -r ruby_git -e 'puts RubyGit::VERSION'` ```
31+
32+
* Create a PR with these changes, have it reviewed and approved, and merged to main.
2733

2834
## Create a GitHub release
2935

@@ -32,14 +38,8 @@ select `Draft a new release`
3238

3339
* Select the tag corresponding to the version being released `v1.1.0.pre1`
3440
* The Target should be `main`
35-
* For the release description, use the output of [changelog-rs](https://github.com/perlun/changelog-rs)
36-
* Since the release has not been created yet, you will need to supply
37-
`changeling-rs` with the current release tag and the tag the new release
38-
is being created from
39-
* For example: `changelog-rs . v1.0.0 v1.1.0.pre1`
40-
* Copy the output, omitting the tag header `## v1.1.0.pre1` and paste into
41-
the release description
42-
* The release description can be edited later if needed
41+
* For the release description, copy the relevant section from the CHANGELOG.md
42+
* The release description can be edited later.
4343
* Select the appropriate value for `This is a pre-release`
4444
* Since `v1.1.0.pre1` is a pre-release, check `This is a pre-release`
4545

Rakefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,16 @@ require 'yardstick/rake/verify'
6363
Yardstick::Rake::Verify.new(:'yardstick:coverage') do |verify|
6464
verify.threshold = 100
6565
end
66+
67+
# Changelog
68+
69+
require 'github_changelog_generator/task'
70+
71+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
72+
config.header = '# Change Log'
73+
config.user = 'jcouball'
74+
config.project = 'ruby_git'
75+
config.future_release = "v#{RubyGit::VERSION}"
76+
config.release_url = 'https://github.com/jcouball/ruby_git/releases/tag/%s'
77+
config.author = true
78+
end

ruby_git.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Gem::Specification.new do |spec|
4242

4343
spec.add_development_dependency 'bump', '~> 0.9'
4444
spec.add_development_dependency 'bundler-audit', '~> 0.7'
45+
spec.add_development_dependency 'github_changelog_generator', '~> 1.15'
4546
spec.add_development_dependency 'rake', '~> 13.0'
4647
spec.add_development_dependency 'redcarpet', '~> 3.5'
4748
spec.add_development_dependency 'rspec', '~> 3.9'

0 commit comments

Comments
 (0)