Creating a Release
Publish a completed feature branch using the tooling from Release Setup. The project owner chooses the release version and message.
Prepare the Release
If the project has a pyproject.toml with [project] package metadata, keep its literal version aligned with the application’s canonical D<Name>.VERSION before releasing. The release script checks that agreement before merging, updates both to the new release version, and commits both files. Dynamic or ambiguous [project].version declarations fail clearly rather than being silently skipped. Tool-only pyproject.toml files without [project] are unaffected.
Finish the relevant verification and documentation, confirm every completed change already has an entry accumulated through Changelog Maintenance, and commit all work. Meaningful work should already have one current ### Summary in Unreleased, even for a single feature or fix; add or refresh it before release if needed. The release script does not write that explanation. Run from a feature branch with a clean working tree. Incorporate any changes from main into dev, then from dev into the feature branch, before releasing.
If deployment tracking is enabled, regenerate and commit a changed dependency map before releasing. See Deployment Impact Tracking.
Run the Script
From an interactive terminal:
scripts/new-release.sh 0.1.0 "Pioneer"
Supply the semantic version without a leading v. Prereleases and build metadata are supported. The message becomes CMDB_CODENAME, so use a nonempty message of at most 255 characters without control characters.
The optional third argument selects the next feature branch. Otherwise the script increments the released patch number, for example 0.1.0 produces feat/maint-0.1.1.
scripts/new-release.sh 0.1.0 "Pioneer" feat/next-feature
Review the source branch, tag, codename, next branch, and remote in the summary. Answer y to create and push the release. Cancellation leaves the working branch and release files unchanged; the preflight fetch may have refreshed remote-tracking refs and tags.
What the Script Publishes
After local and remote checks and confirmation, the script:
- Merges the feature branch into
devwith a merge commit. - Updates
VERSION,CMDB_CODENAME, the changelog’s release version and local timestamp, and any static PEP 621[project].versioninpyproject.toml. When enabled, it also records deployment impact. - Commits the release metadata and merges
devintomain. - Creates an annotated
v<version>tag and advancesdevtomain. - Atomically pushes
main,dev, and the tag toorigin. - Creates the next local feature branch. It does not push that branch.
This publishes Git refs. Application installation or upgrades use the project’s deployment scripts. A push to main may also trigger the configured documentation publishing workflow.
Verify or Recover
After success, confirm the released constants, changelog, annotated tag, matching main and dev tips, remote refs, and clean next feature branch. Verify CMDB discovery after deployment using CMDB Compliance.
On failure, the script stops and reports its active step. Inspect git status, branch history, tags, remote refs, and changed release files before deciding how to recover. Local merges, commits, and tags are not rolled back automatically. An atomic push updates all requested remote refs together or none; a rejected push can still leave local release commits and the tag in place. A failure creating the next branch may occur after the release was already published. Do not blindly rerun the release command.