Add last resort version string in scripts/version #2932
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ugh. We do already include some built sources (e.g., outputs of Bison and Flex, the prebuilt man page), so why not a bit more? Well, I'm not going that far -- I'm not including
src/version.h
here, just hard-coding a last resort version string intoscripts/version
.This PR is really about exploring what, if anything we might do about these two issues:
.git
, soscripts/version
can't figure out the current version being built.autoconf
/autoreconf
in the dist tarballs we publish in our releases clobbers thesrc/version.h
included in the tarball, and once again there is no.git
soscripts/version
can be used byMakefile
to recover from this.This PR adds a fallback at the price of having one more thing to update at release time. It might be better instead to commit
src/version.h
, but that's also going to be a pain since we'd have to do that at every commit!