-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Non-monotonic development versions with release branch scheme #1025
Comments
Currently there is no sane way to calculate the combined maximum distance Both hg and git only provide a minimal distance Is there a practical use case for the need of those numbers or is it only a preference I'm not aware of a consistent/safe way to implement what you ask for |
Yeah, I looked at the contents of
Anyway, there isn't much practical use of this; I just wanted to use the GitLab package registry for installing the latest development build, and was rather surprised that it didn't work. |
ah, now i get the problem - and indeed - both git and hg dont allow for that easily however i beleive another mistake is in there - we should add some type of increment for distances so that the commit doesnt hit aka https://github.com/pypa/setuptools_scm/blob/main/src/setuptools_scm/version.py#L299 needs to trigger a bump we need a better test there, but basically - you shouldnt be hitting i need to line up the examples, a bit better |
please outline the way you use branches, tags and merges in more detail i suspect we need errors in the release branch semver scheme for certain cases + better handling of missed increments |
Hi, But sometimes it works like that: $ git describe --always But "python -m build" creates artifacts with incorrect names: (Instead of "1.0.29" there is "1.0.30.dev0+g61e35b4e.d20240902" in package name). Looks like it doesn't depend on versions (newer version of setuptools-scm and Gitlab versions 16.4 and higher). |
That is a different issue when the workdir state is dirty Please cross-check whether you change a committed file in the build process |
I though it is some bug on setuptools-scm or GitLab side, but it was because of dirty workdir (because of git lfs). |
Essentially, I have a stable branch, I've posted a PR that seems to fi it for me 🙂 |
I use
setuptools_scm
for versioning hg-git, with therelease-branch-semver
scheme, where I have release branches named e.g.1.0.x
and1.1.x
. When doing a stable release, I do it on the release branch and merge it intodefault
. Unfortunately, thedevN
is merely calculated as the length to the most recent tag, which then makes it decrease after a minor release is merged into the main development branch.I checked, and I can reproduce this using both Mercurial and Git sources. For example, the version determined relative to
1.1.0
is1.2.0.dev26+g7069705
whereas after the merge, it.s1.2.0.dev17+g5b33fad
.As best I can tell, you cannot easily customise the
devN
part. Forrelease-branch-semver
, I believe it should either:The text was updated successfully, but these errors were encountered: