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

Open
warsaw opened this issue May 3, 2024 · 3 comments
Open

hatch version should allow for version downgrades #1458

warsaw opened this issue May 3, 2024 · 3 comments

Comments

@warsaw
Copy link

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
Sponsor Collaborator

ofek commented May 3, 2024

@warsaw
Copy link
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
Sponsor 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

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

No branches or pull requests

2 participants