mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 18:02:41 +02:00
build: document the release process
This commit is contained in:
parent
6baad623a2
commit
02892bec17
1 changed files with 82 additions and 0 deletions
82
docs/developer/release.md
Normal file
82
docs/developer/release.md
Normal file
|
@ -0,0 +1,82 @@
|
|||
# Releasing guide
|
||||
|
||||
Once in a while, we release this package. Here is how.
|
||||
|
||||
## Pre-requesites
|
||||
|
||||
You need to be in a working environment, with the dev dependencies installed. You can check it's the case by typing:
|
||||
|
||||
```bash
|
||||
pip install -e ".[dev]"
|
||||
```
|
||||
|
||||
You'll need to get an account on [PyPI](https://pypi.org), where the packages will be uploaded.
|
||||
|
||||
## The steps
|
||||
|
||||
Here is the quick version. If you need more details, some parts are explained in more details in the next sections.
|
||||
|
||||
```bash
|
||||
|
||||
# Ensure the tests run correctly
|
||||
make test
|
||||
|
||||
# Bump the version, according to semantic versionning
|
||||
hatch version minor # or `hatch version major``
|
||||
|
||||
# Create a tag on the git repository and push it
|
||||
git tag "$(hatch version)" && git push
|
||||
|
||||
# Build the project
|
||||
hatch build --clean
|
||||
|
||||
# Upload the project to PyPI
|
||||
hatch publish
|
||||
```
|
||||
|
||||
Aditionnaly, ensure it works well in a new environment.
|
||||
|
||||
## Bumping the version number
|
||||
|
||||
We follow semantic versionning conventions, and the version is specified in the `argos.__init__.py` file.
|
||||
`hatch` provide commands to help with this:
|
||||
|
||||
```bash
|
||||
hatch version minor
|
||||
hatch version major
|
||||
```
|
||||
|
||||
## Publishing
|
||||
|
||||
`hatch` will ask you for some credentials. Don't provide them the full credentials to you account, but instead you can [create a (scoped) token](https://pypi.org/manage/account/token/).
|
||||
|
||||
When asked for credentials, enter:
|
||||
|
||||
- `__token__` as the login
|
||||
- the token as the value.
|
||||
|
||||
## Verifying it worked
|
||||
|
||||
Once published, you can test it works properly, by using pip, ideally in a new venv. Here's how:
|
||||
|
||||
```bash
|
||||
python -m venv /tmp/argos
|
||||
source /tmp/argos/bin/activate
|
||||
pip install argos-monitoring
|
||||
argos version # should output the proper version
|
||||
```
|
||||
|
||||
## Using the test server
|
||||
|
||||
When running `hatch publish` the main PyPI instance will be used, which is not ideal for testing that it's doing what you want.
|
||||
|
||||
If you're still experimenting, you can use the [Test PyPI](https://test.pypi.org) server.
|
||||
|
||||
```bash
|
||||
# Publishing on test PyPI
|
||||
hatch build -r test
|
||||
|
||||
# Installing from test PyPI
|
||||
pip install --index-url https://test.pypi.org/simple/ argos-monitoring
|
||||
|
||||
```
|
Loading…
Reference in a new issue