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

Show version number in footer #340 #353

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Show version number in footer #340 #353

merged 1 commit into from
Apr 11, 2024

Conversation

oneiros
Copy link
Collaborator

@oneiros oneiros commented Apr 11, 2024

This is a very simple attempt to fix #340.

TIL (or more probably re-learned about 😬) git describe which already returns something very sensible.

In case your on a tagged version it just returns the tag name. If you are not, it will display the last tag, the number of commits since then and the abbreviated hash of the current commit. So you can see at a glance if someone uses a released version. And if not you can easily find out what state of the repo was used.

So this simply takes the output of git describe and displays it in the footer.

I think with this added, the footer includes too much to still have everything on a single line, so I opted for using some layout here:

image

If you have another idea how to better organize the information, please let me know.

@oneiros oneiros requested a review from a team as a code owner April 11, 2024 12:32
Copy link
Member

@rwaffen rwaffen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah nice. it gives you the last tag and the commits since then as ref with a hash. but from whats the hash? its not a commit. just curious 😄

@rwaffen
Copy link
Member

rwaffen commented Apr 11, 2024

$ git describe --tags --long
test-1-g3c31c73
_ ???

...

The "g" isn't a part of the commit.
Try looking for a commit 3c31c73 using git show 3c31c73.

🤦 😄

Copy link
Member

@tuxmea tuxmea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally.

@rwaffen rwaffen merged commit f22314e into main Apr 11, 2024
11 checks passed
@rwaffen rwaffen deleted the issue-340 branch April 11, 2024 14:21
@rwaffen rwaffen added the enhancement New feature or request label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add version to footer
3 participants