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

Use git commit in version if built from git #289

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

rodarima
Copy link
Member

Attempts to fix #288

I see at least one big problem:

$ git clone ... && cd dillo
$ ./autogen.sh # this will populate the version
$ mkdir build && cd build
$ ../configure && make # Okay, not we build dillo with the correct version
$ cd ..
$ $EDITOR src/...
$ git checkout -b foobar
$ git add ...
$ git commit -m foo
$ cd build
$ ../configure # <--- now we are placing the wrong version in dillo, as it was not updated in configure

So if I forget to run ./autogen.sh again I get a fully working dillo binary with the wrong version.

This should run at configure time, not when running autoconf.

Use git describe to get the current commit and other information to set
VERSION in config.h, when we are not using a tarball release. The file
".tarball-version" stores the version inside the tarball, so it is fixed
for releases. The .version file is not used, so no need to generate it.

If the git program is not present when running autogen.sh, the version
will be set to UNKNOWN. This situation will be very rare as you will
need git to fetch the sources, but continues to allow building Dillo
without the git program.

Fixes: #288
@rodarima rodarima added this to the Release 3.2.0 milestone Oct 28, 2024
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.

Print the commit with dillo -v
1 participant