nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] [patch] detecting and identifying a build from git


From: Eitan Adler
Subject: Re: [Nano-devel] [patch] detecting and identifying a build from git
Date: Fri, 8 Apr 2016 08:01:04 -0700

On 8 April 2016 at 04:40, Benno Schulenberg <address@hidden> wrote:
>
> Now  that the code I used for detecting a build from SVN no longer
> works, it became necessary to convert this to git.  Unfortunately,
> git does not provided nice, linear revision numbers, so the best
> I could think of is to use the short commit hash to identify a
> particular build from git -- the one shown by git log --oneline.
> See attached patch.

Use
git rev-parse --is-inside-work-tree
and
git rev-parse --short HEAD

instead of +    REVISION=`($GIT log -1 >/dev/null 2>&1) && ($GIT log
-1 --oneline | cut -d\  -f1)`




-- 
Eitan Adler



reply via email to

[Prev in Thread] Current Thread [Next in Thread]