<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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 class="Apple-style-span" style="font-size: 12px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">========================================================</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Bradley Lowekamp<span class="Apple-converted-space"> </span><span class="Apple-converted-space"> </span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Medical Science and Computing for</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Office of High Performance Computing and Communications</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">National Library of Medicine<span class="Apple-converted-space"> </span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal 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></body></html>