The Plone Monorepo Helper is a tool designed to manage monorepos containing a repository.toml
configuration file at the repository root. It provides various commands to streamline repository management, versioning, and release processes.
Clone this repository
git clone [email protected]:kitconcept/plone-repo-helper.git
In the repository, install the tool
make install
We use hatch to make the release, please make sure authentication is in place by running:
hatch publish --initialize-auth
npm whoami
Ensure that your monorepo contains a repository.toml
file. Below is an example of such a configuration:
[repository]
name = "fake-distribution"
managed_by_uv = true
changelog = "CHANGELOG.md"
version = "version.txt"
compose = "docker-compose.yml"
[repository.towncrier]
section = "Project"
settings = "towncrier.toml"
[backend]
path = "backend"
[backend.package]
name = "fake.distribution"
path = "backend"
changelog = "backend/CHANGELOG.md"
towncrier_settings = "backend/pyproject.toml"
base_package = "Products.CMFPlone"
publish = false
[frontend]
path = "frontend"
[frontend.package]
name = "fake-distribution"
path = "frontend/packages/fake-distribution"
changelog = "frontend/packages/fake-distribution/CHANGELOG.md"
towncrier_settings = "frontend/packages/fake-distribution/towncrier.toml"
publish = false
To see all available commands, run:
uv run repo
To check the installed version of the tool, use:
uv run repo --version
List current versions for:
- Repository
- Backend package
- Frontend package
uv run repo versions
The release process consists of two subcommands:
changelog
– Generates a draft changelog for review.do
– Performs the package release.
To generate and display the draft changelog, run:
uv run repo release changelog
The do
command creates a new release and accepts the following arguments:
The version argument defines the new version to be used in the release. It can be a specific version number or a version segment. Below is a reference table showing how version segments modify an existing 1.0.0
version:
Segment | New Version |
---|---|
release |
1.0.0 |
major |
2.0.0 |
minor |
1.1.0 |
micro / patch / fix |
1.0.1 |
a / alpha |
1.0.0a0 |
b / beta |
1.0.0b0 |
c / rc / pre / preview |
1.0.0rc0 |
r / rev / post |
1.0.0.post0 |
dev |
1.0.0.dev0 |
Use this flag to simulate the release process without actually publishing the new version.
Example:
uv run repo release do a
This will create an alpha
release.
The following commands are available exclusively for projects managed by UV and with a base_package set in the ][backend.package] section of repository.toml.
To check which is the current base package, run:
uv run repo deps info
To check the current base package version, run:
uv run repo deps check
To upgrade the base package to a specific version, use:
uv run repo deps upgrade 6.1.1