Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 'hatch version' instead of manually updating the version #547

Closed
wants to merge 1 commit into from

Conversation

felixfontein
Copy link
Collaborator

We did this change to antsibull-docs some time ago. I had to fix that a bit today with ansible-community/antsibull-docs@676780b. This PR applies the noxfile changes to this project as well.

Copy link
Contributor

@gotmax23 gotmax23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work unless you define __verison__ in __init__.py and configure hatch in pyproject.toml to read the version from there like we did for antsibull_docs.

@felixfontein
Copy link
Collaborator Author

Hmm, indeed. I find it very strange that hatch doesn't mind updating the version in random files, but not in pyproject.toml. I also wasn't able to find any informatoin on why that's the case; I found a PR pypa/hatch#66 but doesn't give any information on why it was closed (and the PR is broken on GH's side as well).

@gotmax23
Copy link
Contributor

gotmax23 commented Oct 5, 2023

Yeah, hatch version does not support updating the version in pyproject.toml. This can be done pretty easily with tomlkit, but it just hasn't been implemented.

@felixfontein felixfontein marked this pull request as draft November 4, 2023 11:08
@felixfontein
Copy link
Collaborator Author

Closing in favor of #562.

@felixfontein felixfontein deleted the release branch November 22, 2023 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants