Skip to content

Commit

Permalink
release v0.6.0 (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored Feb 18, 2024
1 parent 5a1ae8d commit 523d343
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 6 deletions.
20 changes: 15 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,21 @@ make build install

## Releasing

1. Merge a pull request with title `release v{major}.{minor}.{patch}`, changing `version` in `src/pydistcheck/__init__.py` to the desired version.
2. navigate to https://github.com/jameslamb/pydistcheck/releases
3. edit the draft release there
1. Create a pull request with a version bump.

```shell
bin/create-release-pr '0.6.0'
```

2. Merge that PR.
3. navigate to https://github.com/jameslamb/pydistcheck/releases
4. edit the draft release there
- remove any changelog items that are just "changed the version number" PRs
- ensure that the tag that'll be created matches the version number, in the form `v{major}.{minor}.{patch}`
4. click "publish"
5. click "publish"
- when that happens, CI jobs will run that automatically publish the package to PyPI.
5. Open another pull request with title `bump development version` adding `.99` to the version in `src/pydistcheck/__init__.py`.
6. Open another PR bumping the version

```shell
bin/create-version-bump-pr
```
42 changes: 42 additions & 0 deletions bin/create-release-pr
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

# [description]
#
# Bump the version and create a PR.
#
# [usage]
#
# bin/create-release-pr '4.0.0'
#

set -Eeuo pipefail

NEW_VERSION="${1}"

sed \
-i=.bak \
"/^__version/ s|.*|__version__ = \"${NEW_VERSION}\"|g" \
./src/pydistcheck/__init__.py

rm -f ./src/pydistcheck/*.bak

VERSION=$(
cat ./src/pydistcheck/__init__.py |
grep -E '^__version' |
cut -d '=' -f2 |
tr -d ' "'
)

git checkout -b release/v${VERSION}
git add ./src/pydistcheck/__init__.py

commit_msg="release v${VERSION}"
git commit -m "${commit_msg}"
git push origin release/v${VERSION}

gh pr create \
--repo jameslamb/pydistcheck \
--base 'main' \
--label 'maintenance' \
--title "${commit_msg}" \
--body "${commit_msg}"
33 changes: 33 additions & 0 deletions bin/create-version-bump-pr
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# [description]
#
# Bump the version and create a PR.
#
# [usage]
#
# bin/create-release-pr '4.0.0'
#

set -Eeuo pipefail

sed \
-i=.bak \
"/^__version/ s|\"\$|\.99\"|g" \
./src/pydistcheck/__init__.py

rm -f ./src/pydistcheck/*.bak

git checkout -b ci/dev-version
git add ./src/pydistcheck/__init__.py

commit_msg="bump development version"
git commit -m "${commit_msg}"
git push origin ci/dev-version

gh pr create \
--repo jameslamb/pydistcheck \
--base 'main' \
--label 'maintenance' \
--title "bump development version" \
--body "bump development version"
2 changes: 1 addition & 1 deletion src/pydistcheck/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# no one should be importing from this package
__all__ = [] # type: ignore[var-annotated]

__version__ = "0.5.2.99"
__version__ = "0.6.0"

0 comments on commit 523d343

Please sign in to comment.