6
6
# How to release a new git.gem
7
7
8
8
Releasing 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 )
12
14
13
15
These instructions use an example where the current release version is ` 1.5.0 `
14
16
and 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`.
18
20
From a fork of ruby-git, create a PR containing changes to (1) bump the
19
21
version number, (2) update the CHANGELOG.md, and (3) tag the release.
20
22
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.
31
33
32
34
## Create a GitHub release
33
35
34
36
On [ the ruby-git releases page] ( https://github.com/ruby-git/ruby-git/releases ) ,
35
37
select ` Draft a new release `
36
38
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 `
49
55
50
56
## Build and release the gem
51
57
52
58
Clone [ ruby-git/ruby-git] ( https://github.com/ruby-git/ruby-git ) directly (not a
53
59
fork) and ensure your local working copy is on the master branch
54
60
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
58
64
59
65
Build the git gem and push it to rubygems.org with the command ` rake release `
60
66
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