Show git version numbers - Windows

UPDATED: October.11.2010. The revtag.sh shell script

2 Methods are presented for resolving GIT Hash Numbers to generate the ".version" file in the BIN directory so that OpenSImulator can display version info. This aids in providing the version information for filing Mantis Reports and tracking the versions in use on the various simulators.

Usage:
1. Copy the Batch file to your desktop and edit the pathing to match your system.

2. Create a revtag.sh in the git reposity, immediately above the bin folder. NOTE! if you perform a git clean this revtag.sh will be removed from the folder structure therefore you will have to copy it back in, I suggest you have a copy of it handy somewhere.

For Example:

/OpenSim_GIT

/OpenSim_GIT/opensim

/OpenSim_GIT/opensim/bin

Place this in /OpenSim_GIT/opensim

The Batch File: GIT_Ver.bat
== The Shell Script: revtag.sh ==

Method-1 (shows Git-Hash, Date&amp;Time Stamp of commit)
Resulting output in /bin/.version "04cb782 2010-10-03 10:39:43 -0700"

Git-Bash Command to place in the revtag.sh

echo `git log -n 1 --pretty="format:%h %ci"` &gt;bin/.version

=== Method-2 (shows Git-Hash, Revision Tag) ===

Resulting output in /bin/.version "04cb782-r/13617"

Git-Bash Commands to place in the revtag.sh

GitNum=`git log -n 1 --pretty="format:%h-"` RevNum=`git describe --tags` echo $GitNum$RevNum &gt;bin/.version

--WhiteStar 13:49, 11 October 2010 (UTC)