Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

poetry commands fail when commit is not tagged #13

Closed
BayerSe opened this issue Aug 9, 2021 · 2 comments
Closed

poetry commands fail when commit is not tagged #13

BayerSe opened this issue Aug 9, 2021 · 2 comments

Comments

@BayerSe
Copy link

BayerSe commented Aug 9, 2021

Hi @tiangolo, many thanks for adding this plugin! I'm currently working on replacing pipenv with poetry and this seems to be the last missing piece.

When testing your plugin I realized that many poetry commands fail when there is either no git tag set at all or when the current commit is not tagged.
Do I misunderstand some step in the intended workflow or is this a bug?

Below please find the steps required to reproduce the errors. Also other commands, e.g. poetry install fail with the same message.

# Preparation steps
poetry new TestPackage
git init TestPackage
cd TestPackage

# works
poetry shell
exit

# add plugin
echo \n[tool.poetry-version-plugin]\nsource = \"git-tag\" >> pyproject.toml

# raises: 
# fatal: No names found, cannot describe anything.
# poetry-version-plugin: No Git tag found, not extracting dynamic version
poetry shell

# create a tag
git add -A
git commit -a -m "Initial commit"
git tag 0.0.1

# works
poetry shell
exit

# add a new commit without tag
echo TestPackage > README.md
git add README.md
git commit -a -m "add readme"

# raises:
# fatal: no tag exactly matches '6972216108011dd40616c7e92fbd75ee00f96498'
# poetry-version-plugin: No Git tag found, not extracting dynamic version
poetry shell
@ar90n
Copy link

ar90n commented Apr 10, 2022

I met the same issue. Are there any plans to solve it?

@tiangolo
Copy link
Owner

tiangolo commented Sep 8, 2024

Thanks for the patience with my reply! 😅

I just marked this project as deprecated, I'm currently not using it and I think these ideas can be achieved in better ways: https://github.com/tiangolo/poetry-version-plugin#-warning-deprecated-

Given that I'll close this one, but thanks for the interest! ☕

@tiangolo tiangolo closed this as completed Sep 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants