Skip to content

Commit 523d343

Browse files
authored
release v0.6.0 (#229)
1 parent 5a1ae8d commit 523d343

File tree

4 files changed

+91
-6
lines changed

4 files changed

+91
-6
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,21 @@ make build install
1313

1414
## Releasing
1515

16-
1. Merge a pull request with title `release v{major}.{minor}.{patch}`, changing `version` in `src/pydistcheck/__init__.py` to the desired version.
17-
2. navigate to https://github.com/jameslamb/pydistcheck/releases
18-
3. edit the draft release there
16+
1. Create a pull request with a version bump.
17+
18+
```shell
19+
bin/create-release-pr '0.6.0'
20+
```
21+
22+
2. Merge that PR.
23+
3. navigate to https://github.com/jameslamb/pydistcheck/releases
24+
4. edit the draft release there
1925
- remove any changelog items that are just "changed the version number" PRs
2026
- ensure that the tag that'll be created matches the version number, in the form `v{major}.{minor}.{patch}`
21-
4. click "publish"
27+
5. click "publish"
2228
- when that happens, CI jobs will run that automatically publish the package to PyPI.
23-
5. Open another pull request with title `bump development version` adding `.99` to the version in `src/pydistcheck/__init__.py`.
29+
6. Open another PR bumping the version
30+
31+
```shell
32+
bin/create-version-bump-pr
33+
```

bin/create-release-pr

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
3+
# [description]
4+
#
5+
# Bump the version and create a PR.
6+
#
7+
# [usage]
8+
#
9+
# bin/create-release-pr '4.0.0'
10+
#
11+
12+
set -Eeuo pipefail
13+
14+
NEW_VERSION="${1}"
15+
16+
sed \
17+
-i=.bak \
18+
"/^__version/ s|.*|__version__ = \"${NEW_VERSION}\"|g" \
19+
./src/pydistcheck/__init__.py
20+
21+
rm -f ./src/pydistcheck/*.bak
22+
23+
VERSION=$(
24+
cat ./src/pydistcheck/__init__.py |
25+
grep -E '^__version' |
26+
cut -d '=' -f2 |
27+
tr -d ' "'
28+
)
29+
30+
git checkout -b release/v${VERSION}
31+
git add ./src/pydistcheck/__init__.py
32+
33+
commit_msg="release v${VERSION}"
34+
git commit -m "${commit_msg}"
35+
git push origin release/v${VERSION}
36+
37+
gh pr create \
38+
--repo jameslamb/pydistcheck \
39+
--base 'main' \
40+
--label 'maintenance' \
41+
--title "${commit_msg}" \
42+
--body "${commit_msg}"

bin/create-version-bump-pr

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
# [description]
4+
#
5+
# Bump the version and create a PR.
6+
#
7+
# [usage]
8+
#
9+
# bin/create-release-pr '4.0.0'
10+
#
11+
12+
set -Eeuo pipefail
13+
14+
sed \
15+
-i=.bak \
16+
"/^__version/ s|\"\$|\.99\"|g" \
17+
./src/pydistcheck/__init__.py
18+
19+
rm -f ./src/pydistcheck/*.bak
20+
21+
git checkout -b ci/dev-version
22+
git add ./src/pydistcheck/__init__.py
23+
24+
commit_msg="bump development version"
25+
git commit -m "${commit_msg}"
26+
git push origin ci/dev-version
27+
28+
gh pr create \
29+
--repo jameslamb/pydistcheck \
30+
--base 'main' \
31+
--label 'maintenance' \
32+
--title "bump development version" \
33+
--body "bump development version"

src/pydistcheck/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# no one should be importing from this package
22
__all__ = [] # type: ignore[var-annotated]
33

4-
__version__ = "0.5.2.99"
4+
__version__ = "0.6.0"

0 commit comments

Comments
 (0)