-
Notifications
You must be signed in to change notification settings - Fork 144
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
tenders, bindings, mfttool: Embed version information #392
Conversation
Generate a common include/solo5/solo5_version.h every time "make" is invoked and the Git version, as defined by the output of "git -C . describe --dirty --tags --always" changes. Embed this information and make it available in the tenders (via --version), mfttool (in the help, and in the generated manifest), and during bindings startup.
this is nice, one question I have: when there is a release of solo5, the release tarball should include a static |
Good point. I don't want to have generated files in git, even on branches, unless necessary. I'll see what I can come up with. |
@mato what I've seen elsewhere is to pass it around via the build system, i.e. |
Warning, Makefile and Git hackery here. Add a "make distrib", to be used for building release tarballs. Generates a static "solo5_version.h.distrib" which is included in the release tarball. This is then used by scripts/gen_version.h.sh as the source of truth for generating "solo5_version.h", so that builds from a release tarball work without Git, but contain meaningful version information.
@hannesm Okay, how about 00f2e08? It's a bit roundabout, but at the end of the day provides a It may still need some tweaking, I'll get to that while making a release. |
@mato that looks fine to me (but now a release is slightly more involved than clicking on github's "draft a release" button -- which is imho fine, but I'd document the steps to make a release) |
When generating a release tarball, don't export files not strictly required for building Solo5 from said tarball. This includes Git-related configuration, CI scripts and the Mirage E2E tests.
CI scripts build from a specific commit, which breaks "make distrib"'s attempts at restoring the working copy back to the old branch, so ignore failures here.
@hannesm I agree that the release process needs documenting, and I'll do that around the time we actually cut the next release. I've pushed a few more tweaks, cleaning up the release tarballs somewhat and also adding |
Generate a common include/solo5/solo5_version.h every time
make
is invoked and the Git version, as defined by the output ofgit -C . describe --dirty --tags --always
changes.Embed this information and make it available in the tenders (via --version), mfttool (in the help, and in the generated manifest), and during bindings startup.
Results:
Fixes #323. /cc @ananos @hannesm @ricarkol