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 allow for version downgrades #1458

Closed
warsaw opened this issue May 3, 2024 · 3 comments · Fixed by #1645
Closed

hatch version should allow for version downgrades #1458

warsaw opened this issue May 3, 2024 · 3 comments · Fixed by #1645

Comments

@warsaw
Copy link
Contributor

warsaw commented May 3, 2024

Let's say I accidentally did hatch version minor when I meant to do hatch version patch. Now I'm stuck having to manually edit the file because hatch version won't let me downgrade even when I give an explicit version number.

$ hatch version
4.1.0
$ hatch version minor
Old: 4.1.0
New: 4.2.0
# Oops! I wanted 4.1.1
$ hatch version 4.1.1
# Traceback and then:
ValueError: Version `4.1.1` is not higher than the original version `4.2.0`

I think either hatch should allow downgrades when an explicit version number is given, or add a --force (or some such) option to allow for downgrades when I know what I'm doing.

@ofek
Copy link
Collaborator

ofek commented May 3, 2024

@warsaw
Copy link
Contributor Author

warsaw commented May 3, 2024

Yep. It's still valuable to default this to true, it would just be nice to have a temporary override, e.g. --force.

@ofek
Copy link
Collaborator

ofek commented May 3, 2024

Okay so this is specifically about a flag rather than disabling that existing option, sure I can do that

warsaw added a commit to warsaw/hatch that referenced this issue Jul 27, 2024
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.

2 participants