Poetry release
Release managment plugin for poetry
The project is currently under development and is not ready for use in production.
Inspired by cargo-release
Features
Installation
Note: Plugins work at Poetry with version 1.2.0 or above.
You can install plugin via poetry
poetry self add poetry-release
or via pipx inject
pipx inject poetry poetry-release
Usage
poetry release <level>
Existing levels
major
minor
patch
release (default)
rc
beta
alpha
Prerequisite
Your project should be managed by git.
Config
Replacements
Poetry-release supports two types of release replacements:
- By RegexYou can create replacements in files using regular expressions:
release-replacements = [ { file="CHANGELOG.md", pattern="\\[Unreleased\\]", replace="[{version}] - {date}" }, ] Message replacements
Replacement |
Description |
|---|---|
release-commit-message |
Message for release commit |
post-release-commit-message |
Message for post release commit(if it’s allowed) |
tag-name |
The name of tag |
tag-message |
The message for tag |
Templates
Poetry-release supports templates to build releases. Templates could be used in release replacements/messages/tags. Template is indicated like some text {package_name}
Template |
Description |
|---|---|
package_name |
The name of this project in pyproject.toml |
prev_version |
The project version before release |
version |
The bumped project version |
next_version |
The version for next development iteration (alpha) |
date |
The current date in %Y-%m-%d` format |
Release settings
These settings allow you to disable part of the functionality. They can be set either in pyproject.toml or in CLI like flag. Settings from CLI have a higher priority
Settings |
Default |
CLI |
pyproject.toml |
Description |
|---|---|---|---|---|
disable-push |
false |
yes |
yes |
Don’t do git push |
disable-tag |
false |
yes |
yes |
Don’t do git tag |
disable-dev |
false |
yes |
yes |
Skip bump version after release |
sign-commit |
false |
no |
yes |
Signed commit |
sign-tag |
false |
no |
yes |
Signed tag |
dry-run |
false |
yes |
no |
Dry run release |
Default git messages
Tag name - {version}
Tag message - Released {package_name} {version}
Release commit - Released {package_name} {version}
Post release commit - Starting {package_name}'s next development iteration {next_version}
Example
[tool.poetry-release]
release-replacements = [
{ file="CHANGELOG.md", pattern="\\[Unreleased\\]", replace="[{version}] - {date}" },
{ file="CHANGELOG.md", pattern="\\(https://semver.org/spec/v2.0.0.html\\).", replace="(https://semver.org/spec/v20.0.html).\n\n## [Unreleased]"},
]
disable-push = false
disable-tag = false
disable-dev = false
release-commit-message = "Release {package_name} {version}"
post-release-commit-message = "Start next development iteration {next_version}"
tag-name = "{version}"
sign-tag = true
sign-commit = true
poetry release minor --disable-dev --disable-tag
Metadata
Release files for poetry-release 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| poetry-release-0.3.1.tar.gz | 10.6 kB | Without provenance | Details for poetry-release-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| poetry_release-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for poetry_release-0.3.1-py3-none-any.whl |
Total release size: 21.6 kB
Release files / poetry-release-0.3.1.tar.gz
| Download URL | poetry-release-0.3.1.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8dabb8d9a65fe23f23486977cbae14831399d4e32e41b4eb152f08e447eaa654
|
|
BLAKE2b-256 checksum How to use checksums |
916cb65de5ff4b4b537f81097ca0004835a402b8de86b8395c7a67adc9910d51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.3
|
Release files / poetry_release-0.3.1-py3-none-any.whl
| Download URL | poetry_release-0.3.1-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
869c19d46e4cf9eb31660159cb17f782630f6e4089bb8827a33a984698c60db3
|
|
BLAKE2b-256 checksum How to use checksums |
08e49b711766a53849ff43e7eb5706fff62f7e211e932b97726b93d3c1fd6c83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.3
|
Security for poetry-release 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.