66# How to release a new git.gem
77
88Releasing a new version of the ` git ` gem requires these steps:
9- * [ Prepare the release] ( #prepare-the-release )
10- * [ Create a GitHub release] ( #create-a-github-release )
11- * [ Build and release the gem] ( #build-and-release-the-gem )
9+
10+ - [ How to release a new git.gem] ( #how-to-release-a-new-gitgem )
11+ - [ Prepare the release] ( #prepare-the-release )
12+ - [ Create a GitHub release] ( #create-a-github-release )
13+ - [ Build and release the gem] ( #build-and-release-the-gem )
1214
1315These instructions use an example where the current release version is ` 1.5.0 `
1416and the new release version to be created is ` 1.6.0.pre1 ` .
@@ -18,45 +20,49 @@ and the new release version to be created is `1.6.0.pre1`.
1820From a fork of ruby-git, create a PR containing changes to (1) bump the
1921version number, (2) update the CHANGELOG.md, and (3) tag the release.
2022
21- * Bump the version number in lib/git/version.rb following [ Semantic Versioning] ( https://semver.org )
22- guidelines
23- * Add a link in CHANGELOG.md to the release tag which will be created later
24- in this guide
25- * Create a new tag using [ git-extras] ( https://github.com/tj/git-extras/blob/master/Commands.md#git-release )
26- ` git release ` command
27- * For example: ` git release v1.6.0.pre1 `
28- * These should be the only changes in the PR
29- * An example of these changes for ` v1.6.0.pre1 ` can be found in [ PR #435 ] ( https://github.com/ruby-git/ruby-git/pull/435 )
30- * Get the PR reviewed, approved and merged to master.
23+ - Bump the version number in lib/git/version.rb following [ Semantic Versioning] ( https://semver.org )
24+ guidelines
25+ - Add a link in CHANGELOG.md to the release tag which will be created later
26+ in this guide
27+ - Create a new tag using [ git-extras] ( https://github.com/tj/git-extras/blob/master/Commands.md#git-release )
28+ ` git release ` command
29+ - For example: ` git release v1.6.0.pre1 `
30+ - These should be the only changes in the PR
31+ - An example of these changes for ` v1.6.0.pre1 ` can be found in [ PR #435 ] ( https://github.com/ruby-git/ruby-git/pull/435 )
32+ - Get the PR reviewed, approved and merged to master.
3133
3234## Create a GitHub release
3335
3436On [ the ruby-git releases page] ( https://github.com/ruby-git/ruby-git/releases ) ,
3537select ` Draft a new release `
3638
37- * Select the tag corresponding to the version being released ` v1.6.0.pre1 `
38- * The Target should be ` master `
39- * For the release description, use the output of [ changelog-rs] ( https://github.com/perlun/changelog-rs )
40- * Since the release has not been created yet, you will need to supply
41- ` changeling-rs ` with the current release tag and the tag the new release
42- is being created from
43- * For example: ` changelog-rs . v1.5.0 v1.6.0.pre1 `
44- * Copy the output, omitting the tag header ` ## v1.6.0.pre1 ` and paste into
45- the release description
46- * The release description can be edited later if needed
47- * Select the appropriate value for ` This is a pre-release `
48- * Since ` v1.6.0.pre1 ` is a pre-release, check ` This is a pre-release `
39+ - Select the tag corresponding to the version being released ` v1.6.0.pre1 `
40+ - The Target should be ` master `
41+ - For the release description, use the output of [ changelog-rs] ( https://github.com/perlun/changelog-rs )
42+ - A Docker image is provided in [ Dockerfile.changelog-rs] ( https://github.com/ruby-git/ruby-git/blob/master/Dockerfile.changelog-rs )
43+ so you don't have to install changelog-rs or the Rust tool chain. To build the
44+ Docker image, run this command from this project's root directory:
45+ - ` docker build --file Dockerfile.changelog-rs --tag changelog-rs . `
46+ - To run the changelog-rs command using this image, run the following command
47+ from this project's root directory (replace the tag names appropriate for the
48+ current release):
49+ - ` docker run --rm --volume "$PWD:/worktree" changelog-rs v1.5.0 v1.6.0.pre1 `
50+ - Copy the output, omitting the tag header ` ## v1.6.0.pre1 ` and paste into
51+ the release description
52+ - The release description can be edited later if needed
53+ - Select the appropriate value for ` This is a pre-release `
54+ - Since ` v1.6.0.pre1 ` is a pre-release, check ` This is a pre-release `
4955
5056## Build and release the gem
5157
5258Clone [ ruby-git/ruby-git] ( https://github.com/ruby-git/ruby-git ) directly (not a
5359fork) and ensure your local working copy is on the master branch
5460
55- * Verify that you are not on a fork with the command ` git remote -v `
56- * Verify that the version number is correct by running ` rake -T ` and inspecting
57- the output for the ` release[remote] ` task
61+ - Verify that you are not on a fork with the command ` git remote -v `
62+ - Verify that the version number is correct by running ` rake -T ` and inspecting
63+ the output for the ` release[remote] ` task
5864
5965Build the git gem and push it to rubygems.org with the command ` rake release `
6066
61- * Ensure that your ` gem sources list ` includes ` https://rubygems.org ` (in my
62- case, I usually have my work’s internal gem repository listed)
67+ - Ensure that your ` gem sources list ` includes ` https://rubygems.org ` (in my
68+ case, I usually have my work’s internal gem repository listed)
0 commit comments