You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> copier copy <path to template> bazcopier copy -r HEAD test xxxxxTraceback (most recent call last): File "/home/ad/.local/pipx/venvs/copier/lib64/python3.11/site-packages/copier/template.py", line 494, in version dunamai.Version.from_git().serialize(style=dunamai.Style.Pep440) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ad/.local/pipx/venvs/copier/lib64/python3.11/site-packages/dunamai/__init__.py", line 1094, in from_git tag, base, stage, unmatched, tagged_metadata, epoch = _match_version_pattern( ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ad/.local/pipx/venvs/copier/lib64/python3.11/site-packages/dunamai/__init__.py", line 244, in _match_version_pattern raise ValueError(_pattern_error("The pattern did not match any tags", pattern, sources))ValueError: The pattern did not match any tagsPattern:(?x) (?# ignore whitespace) ^v((?P<epoch>\d+)!)?(?P<base>\d+(\.\d+)*) (?# v1.2.3 or v1!2000.1.2) ([-._]?((?P<stage>[a-zA-Z]+)[-._]?(?P<revision>\d+)?))? (?# b0) (\+(?P<tagged_metadata>.+))?$ (?# +linux)Tags:['foo']During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/home/ad/.local/bin/copier", line 8, in <module> sys.exit(copier_app_run()) ^^^^^^^^^^^^^^^^ File "/home/ad/.local/pipx/venvs/copier/lib64/python3.11/site-packages/plumbum/cli/application.py", line 639, in run inst, retcode = subapp.run(argv, exit=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ad/.local/pipx/venvs/copier/lib64/python3.11/site-packages/plumbum/cli/application.py", line 634, in run retcode = inst.main(*tailargs) ^^^^^^^^^^^^^^^^^^^^ File "/home/ad/.local/pipx/venvs/copier/lib64/python3.11/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ad/.local/pipx/venvs/copier/lib64/python3.11/site-packages/copier/cli.py", line 66, in handle_exceptions return method(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ad/.local/pipx/venvs/copier/lib64/python3.11/site-packages/copier/cli.py", line 243, in main ).run_copy() ^^^^^^^^^^ File "/home/ad/.local/pipx/venvs/copier/lib64/python3.11/site-packages/copier/main.py", line 737, in run_copy f"\nCopying from template version {self.template.version}", ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.11/functools.py", line 1001, in __get__ val = self.func(instance) ^^^^^^^^^^^^^^^^^^^ File "/home/ad/.local/pipx/venvs/copier/lib64/python3.11/site-packages/copier/template.py", line 501, in version return Version(f"{base}.post{count}+{git_hash}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ad/.local/pipx/venvs/copier/lib64/python3.11/site-packages/packaging/version.py", line 198, in __init__ raise InvalidVersion(f"Invalid version: '{version}'")packaging.version.InvalidVersion: Invalid version: 'foo.post1+g4e29b5d'
Logs
No response
Expected behavior
No crash or a user friendly error message.
Screenshots/screencasts/logs
No response
Operating system
Linux
Operating system distribution and version
Fedora 37
Copier version
8.0.0
Python version
3.11
Installation method
pipx+pypi
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the problem
I get a raw traceback when the template git branch HEAD has no tag but has a parent commit with a tag.
It works if there is no tag on parent commits though.
Template
To Reproduce
Logs
No response
Expected behavior
No crash or a user friendly error message.
Screenshots/screencasts/logs
No response
Operating system
Linux
Operating system distribution and version
Fedora 37
Copier version
8.0.0
Python version
3.11
Installation method
pipx+pypi
Additional context
No response
The text was updated successfully, but these errors were encountered: