Skip to content

Commit

Permalink
fix: --override-version strips a v-prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinDeJong-TomTom committed May 17, 2022
1 parent 1f1f0cb commit b916dd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- The option `--override-version` accepts versions prefixed with v`

## [1.0.2] - 2022-05-17
### Changed
- GitHub Releases and associated tags are now both prefixed with `v` (i.e. `v1.0.0` iso `1.0.0`)
Expand Down
4 changes: 4 additions & 0 deletions changelogmanager/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ def validate(_: Mapping) -> None:
def release(ctx: Mapping, apply: bool, override_version: Optional[str]) -> None:
"""Release changes added to [Unreleased] block"""

# Strip `v` from the provided version tag
if override_version.startswith("v"):
override_version = override_version[1:]

changelog = ctx.obj["changelog"]
changelog.release(override_version)

Expand Down

0 comments on commit b916dd6

Please sign in to comment.