Skip to content

Commit ad7117b

Browse files
WilliamBergaminseratchfilmaj
authored
Development release steps in guide (#725)
Co-authored-by: Kazuhiro Sera <[email protected]> Co-authored-by: Fil Maj <[email protected]>
1 parent ffae9d2 commit ad7117b

File tree

3 files changed

+66
-40
lines changed

3 files changed

+66
-40
lines changed

.github/maintainers_guide.md

Lines changed: 65 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,24 @@ $ FLASK_APP=app.py FLASK_ENV=development flask run -p 3000
108108
$ ngrok http 3000 --subdomain {your-domain}
109109
```
110110

111+
#### Develop Locally
112+
113+
If you want to test the package locally you can.
114+
1. Build the package locally
115+
- Run
116+
```bash
117+
scripts/build_pypi_package.sh
118+
```
119+
- This will create a `.whl` file in the `./dist` folder
120+
2. Use the built package
121+
- Example `/dist/slack_bolt-1.2.3-py2.py3-none-any.whl` was created
122+
- From anywhere on your machine you can install this package to a project with
123+
```bash
124+
pip install <project path>/dist/slack_bolt-1.2.3-py2.py3-none-any.whl
125+
```
126+
- It is also possible to include `<project path>/dist/slack_bolt-1.2.3-py2.py3-none-any.whl` in a [requirements.txt](https://pip.pypa.io/en/stable/user_guide/#requirements-files) file
127+
128+
111129
### Releasing
112130

113131
#### Generate API documents
@@ -126,65 +144,73 @@ username: {your username}
126144
password: {your password}
127145
```
128146

129-
##### Deployment
130147

131-
You can deploy a new version using `./scripts/deploy_to_test_pypi_org.sh`.
148+
#### Development Deployment
132149

133-
```bash
134-
$ echo '__version__ = "{the version}"' > slack_bolt/version.py
135-
$ ./scripts/deploy_to_test_pypi_org.sh
136-
```
150+
1. Create a branch in which the development release will live:
151+
- Bump the version number in adherence to [Semantic Versioning](http://semver.org/) and [Developmental Release](https://peps.python.org/pep-0440/#developmental-releases) in `slack_bolt/version.py`
152+
- Example the current version is `1.2.3` a proper development bump would be `1.3.0.dev0`
153+
- `.dev` will indicate to pip that this is a [Development Release](https://peps.python.org/pep-0440/#developmental-releases)
154+
- Note that the `dev` version can be bumped in development releases: `1.3.0.dev0` -> `1.3.0.dev1`
155+
- Commit with a message including the new version number. For example `1.3.0.dev0` & Push the commit to a branch where the development release will live (create it if it does not exist)
156+
- `git checkout -b future-release`
157+
- `git commit -m 'version 1.3.0.dev0'`
158+
- `git push future-release`
159+
- Create a git tag for the release. For example `git tag v1.3.0.dev0`.
160+
- Push the tag up to github with `git push origin --tags`
137161

138-
#### Production Deployment
162+
2. Distribute the release
163+
- Use the latest stable Python runtime
164+
- `python -m venv .venv`
165+
- `./scripts/deploy_to_pypi_org.sh`
166+
- You do not need to create a GitHub release
167+
168+
3. (Slack Internal) Communicate the release internally
139169

140-
1. Create the commit for the release:
141170

142-
- Bump the version number in adherence to [Semantic Versioning](http://semver.org/) in `slack_bolt/version.py`
143-
- `echo '__version__ = "1.2.3"' > slack_bolt/version.py`
144-
- Commit with a message including the new version number. For example `1.2.3` & Push the commit to a branch and create a PR to sanity check.
145-
- `git checkout -b v1.2.3-release`
146-
- `git commit -m'version 1.2.3'`
147-
- `git push {your-fork} v1.2.3-release`
148-
- Merge in release PR after getting an approval from at least one maintainer.
149-
- Create a git tag for the release. For example `git tag v1.2.3`.
150-
- Push the tag up to github with `git push origin --tags`
171+
#### Production Deployment
151172

152-
2. Distribute the release
173+
1. Create the commit for the release:
174+
- Bump the version number in adherence to [Semantic Versioning](http://semver.org/) in `slack_bolt/version.py`
175+
- Commit with a message including the new version number. For example `1.2.3` & Push the commit to a branch and create a PR to sanity check.
176+
- `git checkout -b v1.2.3-release`
177+
- `git commit -m 'version 1.2.3'`
178+
- `git push {your-fork} v1.2.3-release`
179+
- Merge in release PR after getting an approval from at least one maintainer.
180+
- Create a git tag for the release. For example `git tag v1.2.3`.
181+
- Push the tag up to github with `git push origin --tags`
153182

154-
- Use the latest stable Python runtime
155-
- `python -m venv env`
156-
- `./scripts/deploy_to_prod_pypi_org.sh`
157-
- Create a GitHub release - https://github.com/slackapi/bolt-python/releases
183+
2. Distribute the release
184+
- Use the latest stable Python runtime
185+
- `python -m venv .venv`
186+
- `./scripts/deploy_to_pypi_org.sh`
187+
- Create a GitHub release - https://github.com/slackapi/bolt-python/releases
158188

159-
```markdown
160-
## New Features
189+
```markdown
190+
## New Features
161191
162-
### Awesome Feature 1
192+
### Awesome Feature 1
163193
164-
Description here.
194+
Description here.
165195
166-
### Awesome Feature 2
196+
### Awesome Feature 2
167197
168-
Description here.
198+
Description here.
169199
170-
## Changes
200+
## Changes
171201
172-
* #123 Make it better - thanks @SlackHQ
173-
* #123 Fix something wrong - thanks @seratch
174-
```
202+
* #123 Make it better - thanks @SlackHQ
203+
* #123 Fix something wrong - thanks @seratch
204+
```
175205

176206
3. (Slack Internal) Communicate the release internally
177-
178-
- Include a link to the GitHub release
207+
- Include a link to the GitHub release
179208

180209
4. Make announcements
181-
182-
- #slack-api in dev4slack.slack.com
183-
- #tools-bolt in community.slack.com
210+
- #tools-bolt in community.slack.com
184211

185212
5. (Slack Internal) Tweet by @SlackAPI
186-
187-
- Not necessary for patch updates, might be needed for minor updates, definitely needed for major updates. Include a link to the GitHub release
213+
- Not necessary for patch updates, might be needed for minor updates, definitely needed for major updates. Include a link to the GitHub release
188214

189215
## Workflow
190216

scripts/deploy_to_test_pypi_org.sh

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ pip install -U pip && \
99
rm -rf dist/ build/ slack_bolt.egg-info/ && \
1010
python setup.py sdist bdist_wheel && \
1111
twine check dist/* && \
12-
twine upload --repository testpypi dist/*
12+
twine upload --repository testpypi dist/*

0 commit comments

Comments
 (0)