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

hatch version should be able to handle static version numbers #1419

Open
warsaw opened this issue Apr 23, 2024 · 3 comments
Open

hatch version should be able to handle static version numbers #1419

warsaw opened this issue Apr 23, 2024 · 3 comments

Comments

@warsaw
Copy link
Contributor

warsaw commented Apr 23, 2024

I have a project that uses a static version number in its pyproject.toml file, e.g.

[project]
version = '0.9.0'

When I try to run hatch version minor on this project, I get an error message:

Cannot set version when it is statically defined by the `project.version` field

While I know it would mean changing the pyproject.toml file, I can't think of a reason why this shouldn't be possible. Is it a case of "not implemented yet" or is there a reason why you don't want to support hatch version [level] on a static version number?

I'm using hatch 1.9.4

@ofek
Copy link
Collaborator

ofek commented Apr 23, 2024

I think it was a case of "if there is no dynamic update implementation from the configured plugin we don't know what to do" but as you mention we in fact know precisely what to do lol I can fix this

@trim21
Copy link

trim21 commented Jun 7, 2024

I can send a PR to support this

@trim21
Copy link

trim21 commented Nov 10, 2024

@ofek Do you mind review PR #1557 for this feature?

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 a pull request may close this issue.

3 participants