Skip to content

Commit

Permalink
Let make add build/twine to a virtual environment
Browse files Browse the repository at this point in the history
  • Loading branch information
EliahKagan committed Sep 11, 2023
1 parent f86f09e commit f1ce255
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ release: clean
echo "HEAD SHA = $$(git rev-parse head)"
echo "Latest tag SHA = $$(git tag | sort -nr | head -n1 | xargs git rev-parse)"
@test "$$(git rev-parse head)" = "$$(git tag | sort -nr | head -n1 | xargs git rev-parse)"

# If we're in a virtual environment, add build tools
test -z "$$VIRTUAL_ENV" || pip install -U build twine

# Do the release
make force_release

force_release: clean
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,15 @@ Please have a look at the [contributions file][contributing].

### How to make a new release

- Update/verify the **version** in the `VERSION` file
- Update/verify that the `doc/source/changes.rst` changelog file was updated
- Commit everything
- Run `git tag -s <version>` to tag the version in Git
- Run `make release`
- Update/verify the **version** in the `VERSION` file.
- Update/verify that the `doc/source/changes.rst` changelog file was updated.
- Commit everything.
- Run `git tag -s <version>` to tag the version in Git.
- *Optionally* create and activate a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment) using `venv` or `virtualenv`.\
(If run in a virtual environment, the next step will automatically take care of installing `build` and `twine` in it.)
- Run `make release`.
- Close the milestone mentioned in the _changelog_ and create a new one. _Do not reuse milestones by renaming them_.
- Got to [GitHub Releases](https://github.com/gitpython-developers/GitPython/releases) and publish a new one with the recently pushed tag. Generate the changelog.
- Go to [GitHub Releases](https://github.com/gitpython-developers/GitPython/releases) and publish a new one with the recently pushed tag. Generate the changelog.

### How to verify a release (DEPRECATED)

Expand Down
1 change: 0 additions & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
black
build
coverage[toml]
ddt>=1.1.1, !=1.4.3
mypy
Expand Down

0 comments on commit f1ce255

Please sign in to comment.