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

When running pre-commit autoupdate choose which type of update you want #3052

Closed
paddyroddy opened this issue Nov 4, 2023 · 4 comments
Closed

Comments

@paddyroddy
Copy link

search you tried in the issue tracker

autoupdate major

describe your actual problem

I have a package that is a GitHub Action as well as a pre-commit hook. So it updates in minor version v0.1.0 and has a major version tracking it v0 which will update automatically on tag. For the purpose of GitHub actions this is what I want as I can do paddyroddy/my-action@v0. But for the pre-commit hook I want to point to v0.1.0 and when I run pre-commit autoupdate it should go to v0.2.0, not v0 (as mutable reference error will happen). But this is what occurs when I run pre-commit autoupdate.

I tried the minor versions to be without v, i.e. 0.1.0 & v0. As well as v0.1.0 & 0 and that approach worked the same as if both had the v in front.

pre-commit --version

3.5.0

@asottile
Copy link
Member

asottile commented Nov 4, 2023

there are many duplicates. please search better

@asottile asottile closed this as completed Nov 4, 2023
@paddyroddy
Copy link
Author

there are many duplicates. please search better

Could you please point me to some? I searched a fair few

@paddyroddy
Copy link
Author

My bad I found #2311. When I run git describe FETCH_HEAD --tags --abbrev=0 on https://github.com/paddyroddy/.github I get v0.34.0. So why does it go to v0 when running pre-commit autoupdate?

@paddyroddy
Copy link
Author

I have fixed my issue by manually creating a non-annotated tag https://github.com/paddyroddy/.github/blob/3ddbe9b8e3d71099c363c70b2c4f4eb1aa8a2748/.github/workflows/tags.yml#L41-L49. Found remark here #1925 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants