-
Notifications
You must be signed in to change notification settings - Fork 230
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
Avoid git during build #298
Conversation
Maybe this can be done using: |
I gave it a try, @kleunen. The limitation I see is that it "only updates the VERSION file within the CI container, so build tooling can then access this information elsewhere". However in my scenario, I really want to use the packaged files attached to the releases; to build Probably a simple, manual |
ah, yes. Then somehow with an action when a new tag is created, this version file needs to be updated and committed. https://github.com/dolittle/write-version-to-file-action#example-workflow Or maybe it should be part of the release build process, that the version file is generated inside the tar.gz |
Another option is using a git post-commit hook to create a (release) tag, when changing the version in a file: Which is the preference of the maintainer/s? |
I'm not too fussed - the thing I like about the current solution is that it's effectively automatic, but good spot on the fail when using a release package. Post-commit hook sounds good if you understand it better than I do! We'll need to include it in the cmake build (CMakeLists.txt) as well as the plain Makefile. This also works, falling back to a date if it can't find a version, but might be a bit hackish...:
|
Another possibility might be to create a small script for making a release. Which creates the tag and writes it to a file and commits the version file |
Yes, this is definitively not a big issue. I "fixed" it on my side with some other automatic foo that works in this place. A Closing here, as the code proposed is just not useful 😄 |
Currently during build time
git
is being used to detect the version oftilemaker
. However, when using a release package, it is not a git repository anymore and this command fails. It would be good to find an alternative. Here proposing just to set manually the version in theMakefile
, but there might be better solutions to this.