Skip to content

Commit 3115f79

Browse files
committed
Document how to use the release script
1 parent 96b5c9b commit 3115f79

File tree

1 file changed

+46
-9
lines changed

1 file changed

+46
-9
lines changed

devel/release.md

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,50 @@ report issues. Typically, there is a single alpha or beta release, but if there
1515
are a higher than expected number of issues there can be multiple releases
1616
(e.g, a2 or b2).
1717

18-
## 1. Update submodules
18+
## Automated release
19+
20+
### 1. (Optional) Update submodules
21+
22+
Update submodules by referring to this [link](https://github.com/kubernetes-client/python/blob/master/devel/submodules.md#update-submodule). Commit the changes and open a pull request.
23+
24+
### 2. Run the release script and send a PR
25+
26+
```
27+
export MINOR_VERSION=x
28+
export PATCH_VERSION=y # The latest patch version for the minor version. Not required for snapshot.
29+
```
30+
To create a snapshot:
31+
```
32+
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.0.0-snapshot DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh
33+
```
34+
To create an a1 release:
35+
```
36+
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0a1 DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh
37+
```
38+
To create a b1 release:
39+
```
40+
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0b1 DEVELOPMENT_STATUS="4 - Beta" scripts/release.sh
41+
```
42+
To create a stable release:
43+
```
44+
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0 DEVELOPMENT_STATUS="5 - Production/Stable" scripts/release.sh
45+
```
46+
### 3. README
47+
48+
Update the compatibility matrix and maintenance status in the README file.
49+
50+
### Submit pull request
51+
52+
Typically after the you've completed steps 2-6 above you can push your changes
53+
open a pull request against `kubernetes-client:release-x.y`
54+
55+
## (Deprecated) Manual release
56+
57+
### 1. Update submodules
1958

2059
Update submodules by referring to this [link](https://github.com/kubernetes-client/python/blob/master/devel/submodules.md#update-submodule). Commit the changes and open a pull request.
2160

22-
## 2. Create or update release branch
61+
### 2. Create or update release branch
2362

2463
The release branch name should have release-x.x format. All minor and pre-releases
2564
should be on the same branch. To update an existing branch with master (only for
@@ -36,7 +75,7 @@ git pull -X theirs upstream master
3675
You may need to fix some conflicts. For auto-generated files, you can commit
3776
either version. They will be updated to the current version in the next step.
3877

39-
## 3. Update release tags
78+
### 3. Update release tags
4079

4180
Release tags are in the "scripts/constants.py" file. These are the constants you
4281
may need to update:
@@ -73,7 +112,7 @@ apply the manual fixes.***
73112
git push upstream $RELEASE_BRANCH
74113
```
75114

76-
## 4. Hot issues
115+
### 4. Hot issues
77116

78117
Use the `scripts/apply-hotfixes.sh` script to apply the fixes below in one step.
79118
**As mentioned above, the script should be run after finishing the section "Update release tags". Also, ensure a clean working directory before applying the script.**
@@ -99,19 +138,19 @@ For more details, see [#974](https://github.com/kubernetes-client/python/issues/
99138

100139
5. Add tests for the default `Configuration` behavior (ref: https://github.com/kubernetes-client/python/pull/1303 and https://github.com/kubernetes-client/python/pull/1285). The commit [1ffa61d0650e4c93e0d7f0becd2c54797eafd407](https://github.com/kubernetes-client/python/pull/1285/commits/1ffa61d0650e4c93e0d7f0becd2c54797eafd407) should be cherry-picked.
101140

102-
## 5. CHANGELOG
141+
### 5. CHANGELOG
103142

104143
Make sure the change logs are up to date [here](https://github.com/kubernetes-client/python/blob/master/CHANGELOG.md).
105144
If they are not, follow commits added after the last release and update/commit
106145
the change logs to master.
107146

108147
Then based on the release, follow one of next two steps.
109148

110-
## 6. README
149+
### 6. README
111150

112151
Update the compatibility matrix and maintenance status in the README file.
113152

114-
## Submit pull request
153+
### Submit pull request
115154

116155
Typically after the you've completed steps 2-6 above you can push your changes
117156
open a pull request against `kubernetes-client:release-x.y`
@@ -220,6 +259,4 @@ deactivate
220259
rm -rf .release
221260
```
222261

223-
TODO: Convert steps in this document to an (semi-) automated script.
224-
225262
ref: https://packaging.python.org/distributing/

0 commit comments

Comments
 (0)