<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19222"></HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV dir=ltr align=left><SPAN class=032391519-25042012><FONT size=2
face=Verdana>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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=032391519-25042012><FONT size=2
face=Verdana></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=032391519-25042012><FONT size=2
face=Verdana>-M</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Bradley Lowekamp
[mailto:blowekamp@mail.nih.gov] <BR><B>Sent:</B> Wednesday, April 25, 2012
3:01 PM<BR><B>To:</B> Brad King<BR><B>Cc:</B> M Stauffer -V-;
insight-developers@itk.org<BR><B>Subject:</B> Re: [Insight-developers]
incorporating commit info<BR></FONT><BR></DIV>
<DIV></DIV>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.
<DIV><BR></DIV>
<DIV>There is also the command "git describe" which produces strings like:
v0.4.0b-244-gf74d03b</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV>For SimpleITK I have been pondering a more descriptive set of version
parts such as that described in PEP 386.</DIV>
<DIV><BR></DIV>
<DIV><A
href="http://www.python.org/dev/peps/pep-0386/">http://www.python.org/dev/peps/pep-0386/</A></DIV>
<DIV><BR></DIV>
<DIV>Which has the flexible format:</DIV>
<DIV><BR></DIV>
<DIV>
<DIV>N.N[.N]+[{a|b|c|rc}N[.N]+][.postN][.devN]</DIV></DIV>
<DIV><BR></DIV>
<DIV>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.</DIV>
<DIV><BR></DIV>
<DIV>Brad</DIV>
<DIV><BR>
<DIV>
<DIV>On Apr 25, 2012, at 2:49 PM, Brad King wrote:</DIV><BR
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<DIV>On Wed, Apr 25, 2012 at 2:16 PM, M Stauffer -V- <<A
href="mailto:mstauff@verizon.net">mstauff@verizon.net</A>> wrote:<BR>
<BLOCKQUOTE type="cite">During compilation, I'd like to be able to
incorporate the commit hash<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">and at least a flag as to whether there are any
local modifications. The<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">goal is to have this info in the itk binaries for
reliably referencing<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">what version of the toolkit was used for a
particularly build.<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite"><BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">I hear this has been discussed before. I'm willing
to give it a go. If<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">anyone knows the outline of how to do this that'll
really help. I think<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">there are git hooks for getting commit info into a
header file, but I<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">haven't looked recently. Also, we'll want to add
something similar for<BR></BLOCKQUOTE>
<BLOCKQUOTE type="cite">our ANTS toolkit, which currently is still using
svn.<BR></BLOCKQUOTE><BR>FYI, we do this in CMake's own build:<BR><BR><A
href="http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CMakeVersionSource.cmake;hb=v2.8.8">http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CMakeVersionSource.cmake;hb=v2.8.8</A><BR><BR>though
the implementation pre-dates FindGit.cmake so it does not
use<BR>find_package(Git) as a new implementation should.<BR><BR>It does
require a Git command line tool to be found during CMake<BR>configuration of
the project though. To do that on Windows one should<BR>use
find_package(Git) and require CMake >= 2.8.2 to reliably
find<BR>msysGit.<BR><BR>-Brad<BR>_______________________________________________<BR>Powered
by <A href="http://www.kitware.com">www.kitware.com</A><BR><BR>Visit other
Kitware open-source projects at<BR><A
href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR><BR>Kitware
offers ITK Training Courses, for more information
visit:<BR>http://kitware.com/products/protraining.php<BR><BR>Please keep
messages on-topic and check the ITK FAQ
at:<BR>http://www.itk.org/Wiki/ITK_FAQ<BR><BR>Follow this link to
subscribe/unsubscribe:<BR>http://www.itk.org/mailman/listinfo/insight-developers<BR></DIV></BLOCKQUOTE></DIV><BR>
<DIV><SPAN style="FONT-SIZE: 12px" class=Apple-style-span>
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto"
class=Apple-style-span>
<P style="MARGIN: 0px"><FONT style="FONT: 12px Helvetica" size=3
face=Helvetica>========================================================</FONT></P>
<P style="MARGIN: 0px"><FONT style="FONT: 12px Helvetica" size=3
face=Helvetica>Bradley Lowekamp<SPAN
class=Apple-converted-space> </SPAN><SPAN
class=Apple-converted-space> </SPAN></FONT></P>
<P style="MARGIN: 0px"><FONT style="FONT: 12px Helvetica" size=3
face=Helvetica>Medical Science and Computing for</FONT></P>
<P style="MARGIN: 0px"><FONT style="FONT: 12px Helvetica" size=3
face=Helvetica>Office of High Performance Computing and
Communications</FONT></P>
<P style="MARGIN: 0px"><FONT style="FONT: 12px Helvetica" size=3
face=Helvetica>National Library of Medicine<SPAN
class=Apple-converted-space> </SPAN></FONT></P>
<P style="MARGIN: 0px"><FONT style="FONT: 12px Helvetica" size=3
face=Helvetica><A
href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</A></FONT></P><BR
class=Apple-interchange-newline></SPAN></DIV></SPAN><BR
class=Apple-interchange-newline></DIV><BR></DIV></BLOCKQUOTE></BODY></HTML>