commitizen 3.12.0__tar.gz → 3.13.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. {commitizen-3.12.0 → commitizen-3.13.0}/PKG-INFO +1 -1
  2. commitizen-3.13.0/commitizen/__version__.py +1 -0
  3. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cli.py +5 -0
  4. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/commands/bump.py +6 -3
  5. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/git.py +15 -2
  6. {commitizen-3.12.0 → commitizen-3.13.0}/pyproject.toml +2 -2
  7. {commitizen-3.12.0 → commitizen-3.13.0}/setup.py +1 -1
  8. commitizen-3.12.0/commitizen/__version__.py +0 -1
  9. {commitizen-3.12.0 → commitizen-3.13.0}/LICENSE +0 -0
  10. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/__init__.py +0 -0
  11. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/__main__.py +0 -0
  12. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/bump.py +0 -0
  13. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/changelog.py +0 -0
  14. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/changelog_formats/__init__.py +0 -0
  15. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/changelog_formats/asciidoc.py +0 -0
  16. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/changelog_formats/base.py +0 -0
  17. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/changelog_formats/markdown.py +0 -0
  18. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/changelog_formats/restructuredtext.py +0 -0
  19. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/changelog_formats/textile.py +0 -0
  20. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cmd.py +0 -0
  21. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/commands/__init__.py +0 -0
  22. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/commands/changelog.py +0 -0
  23. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/commands/check.py +0 -0
  24. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/commands/commit.py +0 -0
  25. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/commands/example.py +0 -0
  26. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/commands/info.py +0 -0
  27. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/commands/init.py +0 -0
  28. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/commands/list_cz.py +0 -0
  29. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/commands/schema.py +0 -0
  30. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/commands/version.py +0 -0
  31. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/config/__init__.py +0 -0
  32. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/config/base_config.py +0 -0
  33. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/config/json_config.py +0 -0
  34. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/config/toml_config.py +0 -0
  35. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/config/yaml_config.py +0 -0
  36. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/__init__.py +0 -0
  37. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/base.py +0 -0
  38. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/conventional_commits/__init__.py +0 -0
  39. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/conventional_commits/conventional_commits.py +0 -0
  40. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/conventional_commits/conventional_commits_info.txt +0 -0
  41. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/customize/__init__.py +0 -0
  42. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/customize/customize.py +0 -0
  43. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/customize/customize_info.txt +0 -0
  44. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/exceptions.py +0 -0
  45. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/jira/__init__.py +0 -0
  46. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/jira/jira.py +0 -0
  47. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/jira/jira_info.txt +0 -0
  48. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/cz/utils.py +0 -0
  49. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/defaults.py +0 -0
  50. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/exceptions.py +0 -0
  51. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/factory.py +0 -0
  52. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/hooks.py +0 -0
  53. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/out.py +0 -0
  54. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/providers/__init__.py +0 -0
  55. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/providers/base_provider.py +0 -0
  56. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/providers/cargo_provider.py +0 -0
  57. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/providers/commitizen_provider.py +0 -0
  58. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/providers/composer_provider.py +0 -0
  59. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/providers/npm_provider.py +0 -0
  60. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/providers/pep621_provider.py +0 -0
  61. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/providers/poetry_provider.py +0 -0
  62. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/providers/scm_provider.py +0 -0
  63. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/templates/CHANGELOG.adoc.j2 +0 -0
  64. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/templates/CHANGELOG.md.j2 +0 -0
  65. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/templates/CHANGELOG.rst.j2 +0 -0
  66. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/templates/CHANGELOG.textile.j2 +0 -0
  67. {commitizen-3.12.0 → commitizen-3.13.0}/commitizen/version_schemes.py +0 -0
  68. {commitizen-3.12.0 → commitizen-3.13.0}/docs/README.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: commitizen
3
- Version: 3.12.0
3
+ Version: 3.13.0
4
4
  Summary: Python commitizen client tool
5
5
  Home-page: https://github.com/commitizen-tools/commitizen
6
6
  License: MIT
@@ -0,0 +1 @@
1
+ __version__ = "3.13.0"
@@ -243,6 +243,11 @@ data = {
243
243
  "help": "create annotated tag instead of lightweight one",
244
244
  "action": "store_true",
245
245
  },
246
+ {
247
+ "name": ["--annotated-tag-message", "-atm"],
248
+ "help": "create annotated tag message",
249
+ "type": str,
250
+ },
246
251
  {
247
252
  "name": ["--gpg-sign", "-s"],
248
253
  "help": "sign tag instead of lightweight one",
@@ -50,6 +50,7 @@ class Bump:
50
50
  "bump_message",
51
51
  "gpg_sign",
52
52
  "annotated_tag",
53
+ "annotated_tag_message",
53
54
  "major_version_zero",
54
55
  "prerelease_offset",
55
56
  "template",
@@ -197,8 +198,7 @@ class Bump:
197
198
 
198
199
  # If user specified changelog_to_stdout, they probably want the
199
200
  # changelog to be generated as well, this is the most intuitive solution
200
- if not self.changelog and self.changelog_to_stdout:
201
- self.changelog = True
201
+ self.changelog = self.changelog or bool(self.changelog_to_stdout)
202
202
 
203
203
  # No commits, there is no need to create an empty tag.
204
204
  # Unless we previously had a prerelease.
@@ -365,7 +365,10 @@ class Bump:
365
365
  signed=self.bump_settings.get("gpg_sign", False)
366
366
  or bool(self.config.settings.get("gpg_sign", False)),
367
367
  annotated=self.bump_settings.get("annotated_tag", False)
368
- or bool(self.config.settings.get("annotated_tag", False)),
368
+ or bool(self.config.settings.get("annotated_tag", False))
369
+ or bool(self.bump_settings.get("annotated_tag_message", False)),
370
+ msg=self.bump_settings.get("annotated_tag_message", None),
371
+ # TODO: also get from self.config.settings?
369
372
  )
370
373
  if c.return_code != 0:
371
374
  raise BumpTagFailedError(c.err)
@@ -82,13 +82,19 @@ class GitTag(GitObject):
82
82
  return cls(name=name, rev=obj, date=date)
83
83
 
84
84
 
85
- def tag(tag: str, annotated: bool = False, signed: bool = False) -> cmd.Command:
85
+ def tag(
86
+ tag: str, annotated: bool = False, signed: bool = False, msg: str | None = None
87
+ ) -> cmd.Command:
86
88
  _opt = ""
87
89
  if annotated:
88
90
  _opt = f"-a {tag} -m"
89
91
  if signed:
90
92
  _opt = f"-s {tag} -m"
91
- c = cmd.run(f"git tag {_opt} {tag}")
93
+
94
+ # according to https://git-scm.com/book/en/v2/Git-Basics-Tagging,
95
+ # we're not able to create lightweight tag with message.
96
+ # by adding message, we make it a annotated tags
97
+ c = cmd.run(f'git tag {_opt} "{tag if _opt == "" or msg is None else msg}"')
92
98
  return c
93
99
 
94
100
 
@@ -200,6 +206,13 @@ def get_latest_tag_name() -> str | None:
200
206
  return c.out.strip()
201
207
 
202
208
 
209
+ def get_tag_message(tag: str) -> str | None:
210
+ c = cmd.run(f"git tag -l --format='%(contents:subject)' {tag}")
211
+ if c.err:
212
+ return None
213
+ return c.out.strip()
214
+
215
+
203
216
  def get_tag_names() -> list[str | None]:
204
217
  c = cmd.run("git tag --list")
205
218
  if c.err:
@@ -1,5 +1,5 @@
1
1
  [tool.commitizen]
2
- version = "3.12.0"
2
+ version = "3.13.0"
3
3
  tag_format = "v$version"
4
4
  version_files = [
5
5
  "pyproject.toml:version",
@@ -9,7 +9,7 @@ version_files = [
9
9
 
10
10
  [tool.poetry]
11
11
  name = "commitizen"
12
- version = "3.12.0"
12
+ version = "3.13.0"
13
13
  description = "Python commitizen client tool"
14
14
  authors = ["Santiago Fraire <santiwilly@gmail.com>"]
15
15
  license = "MIT"
@@ -59,7 +59,7 @@ entry_points = \
59
59
 
60
60
  setup_kwargs = {
61
61
  'name': 'commitizen',
62
- 'version': '3.12.0',
62
+ 'version': '3.13.0',
63
63
  'description': 'Python commitizen client tool',
64
64
  'long_description': '[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/commitizen-tools/commitizen/pythonpackage.yml?label=python%20package&logo=github&logoColor=white&style=flat-square)](https://github.com/commitizen-tools/commitizen/actions)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)\n[![PyPI Package latest release](https://img.shields.io/pypi/v/commitizen.svg?style=flat-square)](https://pypi.org/project/commitizen/)\n[![PyPI Package download count (per month)](https://img.shields.io/pypi/dm/commitizen?style=flat-square)](https://pypi.org/project/commitizen/)\n[![Supported versions](https://img.shields.io/pypi/pyversions/commitizen.svg?style=flat-square)](https://pypi.org/project/commitizen/)\n[![homebrew](https://img.shields.io/homebrew/v/commitizen?color=teal&style=flat-square)](https://formulae.brew.sh/formula/commitizen)\n[![Codecov](https://img.shields.io/codecov/c/github/commitizen-tools/commitizen.svg?style=flat-square)](https://codecov.io/gh/commitizen-tools/commitizen)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?style=flat-square&logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)\n\n![Using commitizen cli](images/demo.gif)\n\n---\n\n**Documentation:** [https://commitizen-tools.github.io/commitizen/](https://commitizen-tools.github.io/commitizen/)\n\n---\n\n## About\n\nCommitizen is release management tool designed for teams.\n\nCommitizen assumes your team uses a standard way of committing rules\nand from that foundation, it can bump your project\'s version, create\nthe changelog, and update files.\n\nBy default, commitizen uses [conventional commits][conventional_commits], but you\ncan build your own set of rules, and publish them.\n\nUsing a standardized set of rules to write commits, makes commits easier to read, and enforces writing\ndescriptive commits.\n\n### Features\n\n- Command-line utility to create commits with your rules. Defaults: [Conventional commits][conventional_commits]\n- Bump version automatically using [semantic versioning][semver] based on the commits. [Read More](./bump.md)\n- Generate a changelog using [Keep a changelog][keepchangelog]\n- Update your project\'s version files automatically\n- Display information about your commit rules (commands: schema, example, info)\n- Create your own set of rules and publish them to pip. Read more on [Customization](./customization.md)\n\n## Requirements\n\n[Python](https://www.python.org/downloads/) `3.8+`\n\n[Git][gitscm] `1.8.5.2+`\n\n## Installation\n\nTo make commitizen available in your system\n\n```bash\npip install --user -U Commitizen\n```\n\n### Python project\n\nYou can add it to your local project using one of these:\n\n```bash\npip install -U commitizen\n```\n\nfor Poetry >= 1.2.0:\n\n```bash\npoetry add commitizen --group dev\n```\n\nfor Poetry < 1.2.0:\n\n```bash\npoetry add commitizen --dev\n```\n\n### macOS\n\nvia [homebrew](https://formulae.brew.sh/formula/commitizen):\n\n```bash\nbrew install commitizen\n```\n\n## Usage\n\nMost of the time this is the only command you\'ll run:\n\n```sh\ncz bump\n```\n\nOn top of that, you can use commitizen to assist you with the creation of commits:\n\n```sh\ncz commit\n```\n\nRead more in the section [Getting Started](./getting_started.md).\n\n### Help\n\n```sh\n$ cz --help\nusage: cz [-h] [--debug] [-n NAME] [-nr NO_RAISE] {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} ...\n\nCommitizen is a cli tool to generate conventional commits.\nFor more information about the topic go to https://conventionalcommits.org/\n\noptional arguments:\n -h, --help show this help message and exit\n --debug use debug mode\n -n NAME, --name NAME use the given commitizen (default: cz_conventional_commits)\n -nr NO_RAISE, --no-raise NO_RAISE\n comma separated error codes that won\'t rise error, e.g: cz -nr 1,2,3 bump. See codes at https://commitizen-\n tools.github.io/commitizen/exit_codes/\n\ncommands:\n {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version}\n init init commitizen configuration\n commit (c) create new commit\n ls show available commitizens\n example show commit example\n info show information about the cz\n schema show commit schema\n bump bump semantic version based on the git log\n changelog (ch) generate changelog (note that it will overwrite existing file)\n check validates that a commit message matches the commitizen schema\n version get the version of the installed commitizen or the current project (default: installed commitizen)\n```\n\n## Setting up bash completion\n\nWhen using bash as your shell (limited support for zsh, fish, and tcsh is available), Commitizen can use [argcomplete](https://kislyuk.github.io/argcomplete/) for auto-completion. For this argcomplete needs to be enabled.\n\nargcomplete is installed when you install Commitizen since it\'s a dependency.\n\nIf Commitizen is installed globally, global activation can be executed:\n\n```bash\nsudo activate-global-python-argcomplete\n```\n\nFor permanent (but not global) Commitizen activation, use:\n\n```bash\nregister-python-argcomplete cz >> ~/.bashrc\n```\n\nFor one-time activation of argcomplete for Commitizen only, use:\n\n```bash\neval "$(register-python-argcomplete cz)"\n```\n\nFor further information on activation, please visit the [argcomplete website](https://kislyuk.github.io/argcomplete/).\n\n## Sponsors\n\nThese are our cool sponsors!\n\n<!-- sponsors --><!-- sponsors -->\n\n[conventional_commits]: https://www.conventionalcommits.org\n[semver]: https://semver.org/\n[keepchangelog]: https://keepachangelog.com/\n[gitscm]: https://git-scm.com/downloads\n',
65
65
  'author': 'Santiago Fraire',
@@ -1 +0,0 @@
1
- __version__ = "3.12.0"
File without changes
File without changes