[Insight-developers] incorporating commit info
M Stauffer -V-
mstauff at verizon.net
Wed Apr 25 15:16:40 EDT 2012
Yes I think 'git describe' would be nice since the version numbering is
present and human-readable, along with what should be enough of the hash
to be unique.
-M
_____
From: Bradley Lowekamp [mailto:blowekamp at mail.nih.gov]
Sent: Wednesday, April 25, 2012 3:01 PM
To: Brad King
Cc: M Stauffer -V-; insight-developers at itk.org
Subject: Re: [Insight-developers] incorporating commit info
There are a lot of possible ways to go for describing there you are in
git. Its not clear what the goal for this case should be.
There is also the command "git describe" which produces strings like:
v0.4.0b-244-gf74d03b
For SimpleITK I have been pondering a more descriptive set of version
parts such as that described in PEP 386.
http://www.python.org/dev/peps/pep-0386/
Which has the flexible format:
N.N[.N]+[{a|b|c|rc}N[.N]+][.postN][.devN]
with the hope the dev can describe the next branch, and the post can
describe the release branch. For those not on the main branches, a hash
would have to be added. But this may be more that you are looking for in
describing ITK's revision and status.
Brad
On Apr 25, 2012, at 2:49 PM, Brad King wrote:
On Wed, Apr 25, 2012 at 2:16 PM, M Stauffer -V- <mstauff at verizon.net>
wrote:
During compilation, I'd like to be able to incorporate the commit hash
and at least a flag as to whether there are any local modifications. The
goal is to have this info in the itk binaries for reliably referencing
what version of the toolkit was used for a particularly build.
I hear this has been discussed before. I'm willing to give it a go. If
anyone knows the outline of how to do this that'll really help. I think
there are git hooks for getting commit info into a header file, but I
haven't looked recently. Also, we'll want to add something similar for
our ANTS toolkit, which currently is still using svn.
FYI, we do this in CMake's own build:
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CMakeVersionSource.c
make;hb=v2.8.8
though the implementation pre-dates FindGit.cmake so it does not use
find_package(Git) as a new implementation should.
It does require a Git command line tool to be found during CMake
configuration of the project though. To do that on Windows one should
use find_package(Git) and require CMake >= 2.8.2 to reliably find
msysGit.
-Brad
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers
========================================================
Bradley Lowekamp
Medical Science and Computing for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20120425/1d291606/attachment.htm>
More information about the Insight-developers
mailing list