diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eb250e3..2c1f718 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,13 +27,22 @@ - Maintainers assign accepted work to a milestone when it has a target release. Issues without a milestone stay in the backlog. Add a due date when a release date has been agreed. -- When a version is ready to ship, update the package version in - `pyproject.toml`, tag the tested commit on `main` with an annotated tag such - as `v0.1.0`, and publish the corresponding [Gitea release][releases]. Include - user-visible changes, installation or upgrade instructions, and any known - limitations. Use tags such as - `v0.1.0-rc.1` for release candidates and mark them as prereleases. Close the - milestone when its target version is published. + +### Prepare a release + +1. Update the package version in `pyproject.toml`. For a release candidate, + use a Python version such as `0.1.0rc1` and a matching Git tag such as + `v0.1.0-rc.1`. [Python version specifiers][versions] +2. From a clean checkout, use `python -m build` to build the source + distribution and wheel. Verify that the source archive contains the + deployment examples and guides. Install the built wheel in a fresh + virtual environment and run the deployment checks for the release. + [Build documentation][build] ยท [Deployment checks][deployment-checks] +3. Create an annotated tag for the tested commit on `main` and publish the + corresponding [Gitea release][releases] with the source distribution + and wheel. Include user-visible changes, installation or upgrade + instructions, and known limitations. Mark a release candidate as a + prerelease. Close the milestone when its target version is published. ## Pull requests @@ -49,6 +58,9 @@ [issues]: https://code.hosting.hippogrief.nl/hippogrief/coulobre/issues [milestones]: https://code.hosting.hippogrief.nl/hippogrief/coulobre/milestones [releases]: https://code.hosting.hippogrief.nl/hippogrief/coulobre/releases +[versions]: https://packaging.python.org/en/latest/specifications/version-specifiers/#pre-releases +[build]: https://build.pypa.io/en/stable/ +[deployment-checks]: docs/deployment.md#verify-a-new-installation ## Code style diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..9e5ad1f --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +include CONTRIBUTING.md manage.py +graft deploy +graft docs +graft tests diff --git a/docs/deployment.md b/docs/deployment.md index 0365231..838bcb1 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -6,7 +6,8 @@ panel and its static files and connects to Gunicorn over a Unix socket. ## Install the package and configure local services -Run these commands from a Coulobre checkout on the server. +Run these commands from a Coulobre checkout or an unpacked source release +on the server. The source release includes the `deploy/` examples used below. ```sh sudo apt install apache2 mariadb-server rabbitmq-server python3-venv python3-dev \ diff --git a/pyproject.toml b/pyproject.toml index 7bcefdc..9f4f0d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "coulobre-panel" -version = "0.1.0.dev0" +version = "0.1.0rc1" description = "A web hosting control panel for hosting providers and resellers." readme = "README.md" requires-python = ">=3.12"