X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/43d3f76921db4456cb18f6df8d5f1dcf1cb0dc0e..faad338efefc02a8a91eaa0ca87ae630e31a5980:/tools/mkversion.pl?ds=sidebyside diff --git a/tools/mkversion.pl b/tools/mkversion.pl index fe6ee0c7..f726640e 100644 --- a/tools/mkversion.pl +++ b/tools/mkversion.pl @@ -15,10 +15,16 @@ $ENV{'LANG'} = "C"; my $githistory = `git fetch --all`; my $gitversion = `git describe --dirty`; my $gitbranch = `git rev-parse --abbrev-ref HEAD`; -my $clean = 2; -my @compiletime = gmtime(); +my $clean = $gitversion =~ '-dirty' ? 0 : 1; +my @compiletime = localtime(); -my $fullgitinfo = 'iceman' . $gitbranch . '/' . $gitversion; +my $fullgitinfo = 'iceman'; + +if ( defined $gitbranch and defined $gitversion ) { + $fullgitinfo = $fullgitinfo.'/'. $gitbranch . '/' . $gitversion; +} else { + $fullgitinfo = $fullgitinfo.'/master/release-build (no_git)'; +} $fullgitinfo =~ s/(\s)//g;