-
Notifications
You must be signed in to change notification settings - Fork 102
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
v0.19.0dev tag should not be on the default branch #456
Comments
I don't think there's a good fix here. Tags shouldn't be deleted. That commit could be on multiple branches and iirc tags reference the commit, not the branch so "moving" it isn't an option. I don't think pre commit is wrong either because no two ecosystems use the same versioning schemes. This isn't ideal but I don't think there's a fix here |
Interesting, pre-commit assumes that tags point to stable versions. I think it’s pretty common for packages to tag pre-release versions. For example, black does this (also available in pre-commit). In gitlint’s case, this is a recent addition with our adoption of hatch and hatch-vcs in particular, we need this for our dev builds to have versions strings like @asottile Perhaps |
it will not support that there are many duplicates in the issue tracker |
@asottile thanks for responding. I should've done due diligence and searched. Mea culpa. For reference: Specific issue with a bit more detail: |
I would argue that hatch needs to be more flexible here if it isn't already. Honestly non-release tags are a lot of noise, there should be a better way to indicate the next potential version string as a dev string. I'm not familiar with hatch though so, I don't know any options off the top of my head and am on my phone at the moment |
So hatch-vcs uses setuptools_scm under the hood. The Default versioning scheme section in the The part that’s relevant here:
Since gitlint versioning scheme has a patch release number (i.e. 0.18.0), This didn’t feel right to me, hence why I added a I also didn’t entirely like having to pollute the tag list with Related side-note: I am actually thinking to do a pre-release for 0.19.0 (and hence add a tag like |
- Correctly increase dev versions when micro tag versions are present - Removes the need to maintain dev tags Relates to #456
- Correctly increase dev versions when micro tag versions are present - Removes the need to maintain dev tags Relates to #456
So I noticed that our recent dev builds were being tagged with with I was able to fix this by switching the version scheme to A nice side-effect is that we no longer need the I did still keep the rc tags for 0.19.0 release as well: At least an rc should be better than a dev build 🤷♂️ |
This is not a bug in
gitlint
itself, but a problem caused by interaction withpre-commit
: runningpre-commit autoupdate
updatesgitlint
hook in.pre-commit-config.yaml
tov0.19.0dev
. This is not good unlessv0.19.0dev
is more recommended thanv0.18.0
.Note that
pre-commit
document says:The text was updated successfully, but these errors were encountered: