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
include commit hash in status output #35
include commit hash in status output #35
Conversation
Signed-off-by: Anton Semjonov <anton@semjonov.de>
Signed-off-by: Anton Semjonov <anton@semjonov.de>
this avoids confusing distclean etc. by not interfering with automake's VERSION or PACKAGE_VERSION Signed-off-by: Anton Semjonov <anton@semjonov.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks, but can we move the version info to slirp4netns --version
with runc-style machine-parseable format? (I can open PR for --version
) https://github.com/opencontainers/runc/blob/f3ce8221ea760f51b5403a9892a69ace43845c2c/main.go#L55-L63
Makefile.am
Outdated
# replaced during git-archive creation | ||
COMMIT := $(shell V=$Format:%h$ ; \ | ||
expr match "$$V" ormat: >/dev/null \ | ||
&& ([ -d .git ] && git describe --always --abbrev || echo unknown) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be using $abs_srcdir
not the build dir. Could you add a cd $abs_srcdir
before any other command?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean $abs_top_srcdir
?
&& ([ -d .git ] && git describe --always --abbrev || echo unknown) \ | |
&& (cd "$$abs_top_srcdir" && [ -d .git ] && git describe --always --abbrev || echo unknown) \ |
PACKAGE_VERSION is defined by the configure script. It is then written into the |
@AkihiroSuda something like this?
|
Yes, also it would be great if we can have |
Signed-off-by: Anton Semjonov <anton@semjonov.de>
current output:
|
Signed-off-by: Anton Semjonov <anton@semjonov.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
LGTM (if CI green)
LGTM as well, merged. Thanks for your contribution! |
This is an alternative to #34 and fixes #22.
main.c
fallback tounknown
if the git command fails orVERSION
is somehow undefined during compilationgit describe
output when building from a checked-out repository or an inserted commit hash when building from a git-archive (i.e. a downloaded tarball)