Package: project-release
project-releaseA tool to help releasing projects.InstallationWithpip:pipinstallproject-releaseUsageInside your project, create a file.project-release-config.yamlA very basic configuration can be generated withproject-release sample-configAll other options are documentedbelowOnce configured, a project can be released by executingproject-releaseConfigurationThe file.project-release-config.yamlis used for the configuration.ConventionsThe project can indicate that it follows certain conventions.Version formatThe version string can be limited to some standards:semverSemantic Versioning:https://semver.orgpep440PEP 440:https://peps.python.org/pep-0440convention:version:semverWhen not defined, the user-specified version string is unrestricted.File updateThe project can indicate that some files need to be updated.Version fileThe version files can be updated in many different ways.If it contains only the version string the configuration will look like:file:version:VERSIONIf something more complex is needed, it can be formatted. The current
version string is available with the format specifier%(version)s:file:version:path:VERSIONformat:'version%(version)s'The multi-line YAML format can also be used:file:version:path:VERSIONformat:|# Autogenerated version fileVERSION="%(version)s"If the file is to be updated only, a pattern can be used. All matches will
be replaced by the new version string:file:version:path:VERSIONpattern:'(?<=version).*'Finally multiple version files can be configured:file:version:-version.plain-path:version.formattedformat:'version%(version)s'-path:version.updatedpattern:'(?<=version).*'Git branchesThedevelopmentbranch andreleasebranch can be configured, so that commit
from thedevelopmentbranch are merged in thereleasebranch prior to create
the release.git:branch:development:'main'release:'release'The definition of these branches are optional. If both are omitted, the current
branch is used for the release and no merge are done. If only one is omitted,
the user will be asked to specify the missing one. Specifying a non-existent
branch will create it.Branch pattern can be configured using the wildcards*and?. In this case
the user will be asked to specify the branch. The specified branch must match
the pattern.git:branch:development:'main'release:'stable-*'The branches can be configured with a list a names and patterns.git:branch:development:'main'release:-'release'-'stable-*'Git commitAfter the merge. If some file as been updated using thefilekeyword,
a commit will be created on thereleasebranch.
Some basic things can be configured:git:commit:message:'bump:version%(version)s'sign-off:truegpg-sign:trueGit tagAfter the merge and the commit, a tag is created on thereleasebranch.
Some basic things can be configured:git:tag:format:'v%(version)s'message:'version%(version)s'annotate:truegpg-sign:trueAdvanced optionStatusAt any time, theproject-release --statuscommand can be used to get an
overview of the current status of the release process.Custom commitAfter the merge, if a custom commit is needed before the bump commit, theproject-release --editcommand can be used. The procedure will stop to let
the user perform the custom commit. Use theproject-release --continuecommand to terminate the procedure.Merge conflictsIf the git merge is not successful, the initialproject-releasecommand will
stop, asking the user to resolve any conflicts.Once the work is done (committed or staged), theproject-release --continuecommand can be used to continue the release process.At any time, theproject-release --abortcommand can be used to interrupt
the release process.