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"
[backend]
path = "backend"
[backend.package]
name = "fake.distribution"
path = "backend"
changelog = "backend/CHANGELOG.md"
towncrier_settings = "backend/pyproject.toml"
[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"
To see all available commands, run:
uv run repo_helper
To check the installed version of the tool, use:
uv run repo_helper --version
List current versions for:
- Repository
- Backend package
- Frontend package
uv run repo_helper version
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_helper 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_helper release do a
This will create an alpha
release.
The following commands are available exclusively for distributions based on Products.CMFPlone
.
To check the current Plone version, run:
uv run repo_helper plone check
To upgrade Plone to a specific version, use:
uv run repo_helper plone upgrade 6.1.1