File: RELEASING.md

package info (click to toggle)
ruby-kubeclient 4.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 712 kB
  • sloc: ruby: 3,114; makefile: 3
file content (66 lines) | stat: -rw-r--r-- 1,753 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Releasing Kubeclient

## Versioning
Kubeclient release versioning follows [SemVer](https://semver.org/).
At some point in time it is decided to release version x.y.z.

```bash
RELEASE_BRANCH="master"
```

## 0. (once) Install gem-release, needed for several commands here:

```bash
gem install gem-release
```

## 1. PR(s) for changelog & bump

Edit `CHANGELOG.md` as necessary.  Even if all included changes remembered to update it, you should replace "Unreleased" section header with appropriate "x.y.z — 20yy-mm-dd" header.

Bump `lib/kubeclient/version.rb` manually, or by using:
```bash
git checkout -b release-$RELEASE_VERSION
gem bump --version $RELEASE_VERSION
git show # View version bump change.
```

Open a PR with target branch $RELEASE_BRANCH and get it reviewed & merged (if open for long, remember to update date in CHANGELOG to actual day of release).

## 2. (once) Grabbing an authentication token for rubygems.org api
```bash
RUBYGEMS_USERNAME=bob
curl -u $RUBYGEMS_USERNAME https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials

cat ~/.gem/credentials
# Should look like this:
:rubygems_api_key: ****
```

## 3. Actual release

Make sure we're locally after the bump PR *merge commit*:
```bash
git checkout $RELEASE_BRANCH
git status # Make sure there are no local changes
git pull --ff-only https://github.com/abonas/kubeclient $RELEASE_BRANCH
git log -n1
```

Last sanity check:
```bash
bundle install
bundle exec rake test rubocop
```

Create and push the tag:
```bash
gem tag --no-push
git push --tags --dry-run https://github.com/abonas/kubeclient  # Check for unexpected tags
git push --tags https://github.com/abonas/kubeclient
```

Release onto rubygems.org:
```bash
gem release
```