Skip to content
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 last resort version string in scripts/version #2932

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nicowilliams
Copy link
Contributor

@nicowilliams nicowilliams commented Oct 13, 2023

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 into scripts/version.

This PR is really about exploring what, if anything we might do about these two issues:

  1. GitHub insists on including a tarball of the workspace of the repo checked out at the release tag when making releases. That tarball does not include .git, so scripts/version can't figure out the current version being built.
  2. Running autoconf/autoreconf in the dist tarballs we publish in our releases clobbers the src/version.h included in the tarball, and once again there is no .git so scripts/version can be used by Makefile 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!

@wader
Copy link
Member

wader commented Oct 14, 2023

Seems like we're not alone with the confusing "Source code" download links https://github.com/orgs/community/discussions/6003. I subscribed to the thread to keep an eye, i guess we would like to disable them if it was possible?

Could an option to be fallback generate some version string that made it very clear something is not right?

@nicowilliams
Copy link
Contributor Author

Could an option to be fallback generate some version string that made it very clear something is not right?

Oh, that's an interesting idea. I like it.

@nicowilliams
Copy link
Contributor Author

nicowilliams commented Oct 16, 2023

Another option is to have .github/workflows/ci.yml make a commit to set the version (thus no need to worry about forgetting to do it manually).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants