-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add git status to Ribasim CLI wrapper version #1479
Conversation
We could do a similar thing to the Project.toml of the Julia core (as that is printed on running). |
This looks nice. Do I understand the format right?
Does this also mean that What I like now is that we always have uniform version numbers. By applying this enhancement to the CLI version number, we don't have that anymore for non-release builds. The version number now exists in these places: #1462 Ribasim/build/tests/test_cli.py Line 33 in 333e2ac
This version number is still the latest release: Ribasim/core/src/libribasim.jl Lines 176 to 181 in 333e2ac
This format does seem to somewhat work with Julia's VersionNumber:
Though if it is easier we could also stop setting the Ribasim version in Project.toml, since we don't use SemVer anyway. We could just set it to The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment, but this does seem like a nice improvement to help prevent confusion.
Also, shouldn't we bump the version number to 2024.9.0 directly after tagging 2024.8.0? To clarify it is a pre-release of 2024.9.0. |
Yes. git describe --tags
v2024.8.0-71-g6b97f732
# Full commit information
git show v2024.8.0-71-g6b97f732
The latter.
I've indeed made sure it works for both Rust and Julia's version semantics (both use semver).
Agreed, but that caused our confusion when comparing our builds locally. Non-release builds should only be for testing and comparing, and having this information really helps.
When one set versions programmatically on release, I have seen versions like
That's a nice crate, it's the external version of our metadata code in Julia. However, I think ideally we have the version in the Julia source code, and other parts (Rust/Python) access it from there. Julia itself has a shellscript to bake the (git) versions into the Base code.
That would depend on our release branches/management (never patch releases?). For now our approach seems to work fine though? |
If we switch to directly updating the version number post-release, will this approach still work? |
No, as it currently uses the git tag. Neither will the information that's now been made in But I'm hesitant to make such changes here, let's discuss design in a new issue first. |
Sounds good, feel free to merge. |
Fixes #1475
What's a bit ugly is that the Cargo.toml is now in a dirty state, but for CI builds that doesn't matter.