From ae5a98ef76f512414aa76fc23a3b650acf71df87 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Sun, 7 Aug 2022 11:21:06 +0800 Subject: [PATCH 1/2] fix(git): use "git tag -v" return_code to check whether a tag is signed --- commitizen/git.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/commitizen/git.py b/commitizen/git.py index 3c86135f8c..3767147877 100644 --- a/commitizen/git.py +++ b/commitizen/git.py @@ -1,5 +1,4 @@ import os -import re from pathlib import Path from tempfile import NamedTemporaryFile from typing import List, Optional @@ -143,11 +142,7 @@ def tag_exist(tag: str) -> bool: def is_signed_tag(tag: str) -> bool: - c = cmd.run(f"git tag -v {tag}") - _ret = False - if re.match("gpg: Signature made [0-9/:A-Za-z ]*", c.err): - _ret = True - return _ret + return cmd.run(f"git tag -v {tag}").return_code == 0 def get_latest_tag_name() -> Optional[str]: From 2c8d5b6049cfe31f06d772a8f98fe30de6595c66 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 7 Aug 2022 06:45:22 +0000 Subject: [PATCH 2/2] =?UTF-8?q?bump:=20version=202.29.4=20=E2=86=92=202.29?= =?UTF-8?q?.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8a98dcef9e..abd29516d5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: no-commit-to-branch - repo: https://github.com/commitizen-tools/commitizen - rev: v2.29.4 # automatically updated by Commitizen + rev: v2.29.5 # automatically updated by Commitizen hooks: - id: commitizen stages: [commit-msg] diff --git a/CHANGELOG.md b/CHANGELOG.md index 764601f996..46ebf26692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ +## v2.29.5 (2022-08-07) + +### Fix + +- **git**: use "git tag -v" return_code to check whether a tag is signed + ## v2.29.4 (2022-08-05) ### Refactor diff --git a/commitizen/__version__.py b/commitizen/__version__.py index b13db77634..2cf6de9708 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "2.29.4" +__version__ = "2.29.5" diff --git a/pyproject.toml b/pyproject.toml index ba93878de3..6d73030dc6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.commitizen] -version = "2.29.4" +version = "2.29.5" tag_format = "v$version" version_files = [ "pyproject.toml:version", @@ -30,7 +30,7 @@ exclude = ''' [tool.poetry] name = "commitizen" -version = "2.29.4" +version = "2.29.5" description = "Python commitizen client tool" authors = ["Santiago Fraire "] license = "MIT"