git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Best practice question
@ 2008-06-19 14:32 D. Stuart Freeman
  2008-06-19 14:54 ` Karl Hasselström
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: D. Stuart Freeman @ 2008-06-19 14:32 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

My project has an "about" page that lists the version.  I understand why
git doesn't do keyword expansion, but I'm wondering if there's a
recommended best practice for keeping that up to date.

-- 
D. Stuart Freeman
Georgia Institute of Technology

[-- Attachment #2: stuart_freeman.vcf --]
[-- Type: text/x-vcard, Size: 162 bytes --]

begin:vcard
fn:D. Stuart Freeman
n:Freeman;Douglas
email;internet:stuart.freeman@et.gatech.edu
tel;work:(404)385-1473
x-mozilla-html:FALSE
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Best practice question
  2008-06-19 14:32 Best practice question D. Stuart Freeman
@ 2008-06-19 14:54 ` Karl Hasselström
  2008-06-19 15:40 ` Santi Béjar
  2008-06-19 16:39 ` Avery Pennarun
  2 siblings, 0 replies; 4+ messages in thread
From: Karl Hasselström @ 2008-06-19 14:54 UTC (permalink / raw)
  To: D. Stuart Freeman; +Cc: git

On 2008-06-19 10:32:35 -0400, D. Stuart Freeman wrote:

> My project has an "about" page that lists the version. I understand
> why git doesn't do keyword expansion, but I'm wondering if there's a
> recommended best practice for keeping that up to date.

Usually when people ask this question on this list, the recommendation
is to have the build system generate a suitable version string. Look
at how git's own built-in version string is generated, for example.
(The GIT-VERSION-GEN script.)

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Best practice question
  2008-06-19 14:32 Best practice question D. Stuart Freeman
  2008-06-19 14:54 ` Karl Hasselström
@ 2008-06-19 15:40 ` Santi Béjar
  2008-06-19 16:39 ` Avery Pennarun
  2 siblings, 0 replies; 4+ messages in thread
From: Santi Béjar @ 2008-06-19 15:40 UTC (permalink / raw)
  To: stuart.freeman; +Cc: git

On Thu, Jun 19, 2008 at 16:32, D. Stuart Freeman
<stuart.freeman@et.gatech.edu> wrote:
> My project has an "about" page that lists the version.  I understand why
> git doesn't do keyword expansion, but I'm wondering if there's a
> recommended best practice for keeping that up to date.

You can look at how git does it:
It generates a GIT-VERSION-FILE with:

http://git.kernel.org/?p=git/git.git;a=blob;f=GIT-VERSION-GEN;hb=HEAD

and reads it in the Makefile. Or you could generate a version.h file.

Santi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Best practice question
  2008-06-19 14:32 Best practice question D. Stuart Freeman
  2008-06-19 14:54 ` Karl Hasselström
  2008-06-19 15:40 ` Santi Béjar
@ 2008-06-19 16:39 ` Avery Pennarun
  2 siblings, 0 replies; 4+ messages in thread
From: Avery Pennarun @ 2008-06-19 16:39 UTC (permalink / raw)
  To: stuart.freeman; +Cc: git

On 6/19/08, D. Stuart Freeman <stuart.freeman@et.gatech.edu> wrote:
> My project has an "about" page that lists the version.  I understand why
>  git doesn't do keyword expansion, but I'm wondering if there's a
>  recommended best practice for keeping that up to date.

If you compile git yourself and run "git --version", it contains the
current version number.  You may want to do it the same way.

See also the "git-describe" command.

Have fun,

Avery

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-06-19 16:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-19 14:32 Best practice question D. Stuart Freeman
2008-06-19 14:54 ` Karl Hasselström
2008-06-19 15:40 ` Santi Béjar
2008-06-19 16:39 ` Avery Pennarun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).