Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Create release script
Browse files Browse the repository at this point in the history
Also remove the extras from pyproject.toml as those seem buggy:

python-poetry/poetry#2073
python-poetry/poetry#1145
  • Loading branch information
sprt committed Jan 18, 2021
1 parent e95b7d9 commit 4d4c2b3
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 42 deletions.
24 changes: 1 addition & 23 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,8 @@ $ tox

## Releasing

Prerequisites:

1. Ensure we're on branch main (`git branch`).
1. Ensure the repo is clean (`git status`).
1. Ensure all the tests pass (`tox`).

```console
$ poetry version <bump>
$ git add pyproject.tml && git commit -m "vX.X.X release"
$ git tag -a vX.X.X -m "vX.X.X release"

$ # Create Docker image.
$ docker build -t ghcr.io/sprt/skippex:X.X.X .
$ # Test image.
$ docker run --rm --network host --entrypoint sh ghcr.io/sprt/skippex:X.X.X -c ". /venv/bin/activate && python -m pytest"
$ # Tag image with "latest".
$ docker tag ghcr.io/sprt/skippex:X.X.X ghcr.io/sprt/skippex:latest
$ # Publish on PYPI.
$ poetry publish --build
$ # Publish on GitHub Container Registry.
$ docker push ghcr.io/sprt/skippex:X.X.X
$ docker push ghcr.io/sprt/skippex:latest
$ # Push to git repo.
$ git push --follow-tags
$ python release.py
```

## Building a development Docker image
Expand Down
47 changes: 32 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ xdg = "^5.0.1"
pid = "^3.0.4"

[tool.poetry.dev-dependencies]
ipython = { version = "<7.17", optional = true } # Python 3.6 support was removed in v7.17.
ipython = "<7.17" # Python 3.6 support was removed in v7.17.
pytest = "^6.2.1"
tox = "^3.21.1"
tox-poetry-dev-dependencies = "^0.0.9"

[tool.poetry.extras]
ipython = ["ipython"]
subprocess-tee = "^0.2.0"

[tool.pytest.ini_options]
filterwarnings = [
Expand Down
Loading

0 comments on commit 4d4c2b3

Please sign in to comment.