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

Set version step in publish_on_tag is unintuitive and likely redundant #25

Open
bglearning opened this issue Dec 17, 2024 · 2 comments
Open

Comments

@bglearning
Copy link

In the publish_on_tag job we have a Set version step which tries to update the version using hatch version <gh-release-tag-version>.

And so when following the intuitive flow of setting the gh-tag (say 0.0.5) to be the same as the (new) version in __about__.py (0.0.5) we get the error

ValueError: Version <gh-release-tag-version> is not higher than the original version <version-in-about-py>

To get around it we would need to set the gh-tag version be higher than the newly updated about version which doesn't seem right.

So this step seems redundant (?)

@bglearning bglearning changed the title Set version step in publish_on_tag is unintuitive and likely redundant Set version step in publish_on_tag is unintuitive and likely redundant Dec 17, 2024
@ArzelaAscoIi
Copy link
Member

Thanks for raising this issue @bglearning when using the publish_on_tag version, i think the best is just to ignore the about.py and only rely on the GH tag. Is this an option ?

@bglearning
Copy link
Author

bglearning commented Dec 23, 2024

just to ignore the about.py and only rely on the GH tag

Do you mean ask users to not update about.py and just update in the gh tag? i.e.

  • Current version 0.0.5
  • User makes changes
  • [Skip] User updates about.py -> 0.0.6
  • User creates release with 0.0.6
  • Job picks up version from gh release and runs hatch version 0.0.6; this updates the about.py

However, this doesn't commit the version update in __about__.py back into the repo? Unless I guess if we add git commands in the job.

I think instead the whole step (Set version) could be removed? And maybe we write in the Readme that users could also use hatch version <new-version> command instead of manually editing __about__.py.
Or is there a downside to doing 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