Skip to content

Commit

Permalink
fix: was always incrementing minor
Browse files Browse the repository at this point in the history
  • Loading branch information
iwishiwasaneagle committed Jun 2, 2022
1 parent e3df62a commit 4ab5859
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

All notable changes to this project will be documented in this file.

## [0.2.1] - 2022-06-02

### Bug Fixes

- Cache key for cargo that invalidates weekly

### Documentation

- Codecov badge

### Miscellaneous Tasks

- Delete legacy file

### Testing

- Install git-cliff during CI

## [0.2.0] - 2022-05-11

### Bug Fixes
Expand All @@ -14,6 +32,10 @@ All notable changes to this project will be documented in this file.

- Pypi shields

### Miscellaneous Tasks

- Update changelog for v0.2.0 [skip pre-commit.ci]

### Refator

- Handle getting current semver better. means -h can be called outwith a repo
Expand Down
8 changes: 5 additions & 3 deletions src/git_release/git_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,14 @@ def setup_ap() -> ap.ArgumentParser: # pragma: no cover
"--minor",
"-m",
dest="inc_minor",
default=True,
action="store_true",
help="Increment the minor version by 1 (resets patch)",
help="Increment the minor version by 1 (resets patch). Default behaviour",
)
increment.add_argument(
"--patch",
"-P",
action="store_true",
help="Increment the patch version by 1 (default behaviour)",
help="Increment the patch version by 1",
dest="inc_patch",
)
increment.add_argument(
Expand Down Expand Up @@ -110,6 +109,9 @@ def main(): # pragma: no cover
semver = increment_minor_semver_by_one(semver)
elif args.inc_patch:
semver = increment_patch_semver_by_one(semver)
else:
semver = increment_minor_semver_by_one(semver)
logger.debug(f"New version: {semver}")
else:
logger.warning(
f"You have chosen not to increment the semantic version. This "
Expand Down

0 comments on commit 4ab5859

Please sign in to comment.