From 4c8c9b128a8e5ad69287e31ea9d68d1fb6dcba1c Mon Sep 17 00:00:00 2001 From: Manuel Barkhau Date: Sat, 3 Oct 2020 17:57:58 +0000 Subject: [PATCH] disallow --release=dev dev releases don't work like other kinds of releases, they would have to be implemented as a different kind of part. --- CHANGELOG.md | 1 + src/pycalver/__main__.py | 2 +- test/test_patterns.py | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36f2886..4643202 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Fix gitlab #8: Push tags only pushed tags, not actual commit. - Fix gitlab #9: Make commit message configurable. - Fix gitlab #11: Show regexp when `--verbose` is used. + - Fix: Disallow `--release=dev` which has different semantics than other release tags. - Switch main repo from gitlab to github. diff --git a/src/pycalver/__main__.py b/src/pycalver/__main__.py index 26d3bb8..3fa3708 100755 --- a/src/pycalver/__main__.py +++ b/src/pycalver/__main__.py @@ -69,7 +69,7 @@ def _configure_logging(verbose: int = 0) -> None: logger.debug("Logging configured.") -VALID_RELEASE_VALUES = ("alpha", "beta", "dev", "rc", "post", "final") +VALID_RELEASE_VALUES = ("alpha", "beta", "rc", "post", "final") _current_date = dt.date.today().isoformat() diff --git a/test/test_patterns.py b/test/test_patterns.py index 2621fc4..e51be13 100644 --- a/test/test_patterns.py +++ b/test/test_patterns.py @@ -130,14 +130,12 @@ V2_PART_PATTERN_CASES = [ (['RELEASE'], "alpha" , "alpha"), (['RELEASE'], "alfa" , None), (['RELEASE'], "beta" , "beta"), - (['RELEASE'], "dev" , "dev"), (['RELEASE'], "rc" , "rc"), (['RELEASE'], "post" , "post"), (['RELEASE'], "final" , "final"), (['RELEASE'], "latest", None), (['PYTAG' ], "a" , "a"), (['PYTAG' ], "b" , "b"), - (['PYTAG' ], "dev" , "dev"), (['PYTAG' ], "rc" , "rc"), (['PYTAG' ], "post" , "post"), (['PYTAG' ], "post" , "post"),