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 git commit to the reported version with -v #318

Merged
merged 1 commit into from
Dec 10, 2024
Merged

Conversation

rodarima
Copy link
Member

@rodarima rodarima commented Dec 9, 2024

When git is available, records the git commit in the dillo binary, so dillo -v reports the version and the commit. Otherwise only the release version is reported (as we do now).

The commit is always recomputed when "make" is called. This allows switching branches, doing a dirty rebuild and still get the correct commit with "dillo -v".

Using AC_INIT() doesn't update the commit when the source is already configured.

Fixes: #288

When git is available, records the git commit in the dillo binary, so
dillo -v reports the version and the commit. Otherwise only the release
version is reported (as we do now).

The commit is *always* recomputed when "make" is called. This allows
switching branches, doing a dirty rebuild and still get the correct
commit with "dillo -v".

Using AC_INIT() doesn't update the commit when the source is already
configured.

Fixes: #288
@rodarima
Copy link
Member Author

Hi @xlex8, could you test this on OpenBSD? It should detect the git commit and report it with "dillo -v". It should say exactly "Dillo v3.1.1-114-g458776d7" in the first line.

@xlex8
Copy link
Contributor

xlex8 commented Dec 10, 2024

This works:
git clone --single-branch --branch report-git-commit https://github.com/dillo-browser/
...
dillo$ src/dillo -v
Dillo v3.1.1-114-g458776d7

@rodarima
Copy link
Member Author

This works: git clone --single-branch --branch report-git-commit https://github.com/dillo-browser/ ... dillo$ src/dillo -v Dillo v3.1.1-114-g458776d7

Nice!, thanks for the check.

(Before it was failing because of the -b flag, which creates a new branch from master rather than switching to the one on the repo.)

@rodarima rodarima merged commit 458776d into master Dec 10, 2024
11 checks passed
@rodarima rodarima deleted the report-git-commit branch December 10, 2024 19:52
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
2 participants