Joseph Galbraith wrote:
Ge van Geldorp wrote:
From: K
McI
Magnus Olsen wrote:
| I like this idea
| ReactOS 0.3-SVN (Build 20050121 Repo 13128)
| as build number
Why not do it in the format Windows seems to do: ReactOS 0.3.0-SVN
(Build 20051010: Revision 14000). Or maybe with spaces for easier
reading (Build 2005 10 10: Revision 14 000)?
The biggest obstacle I see is actually getting the SVN revision
number in
our source somewhere. Maybe our local SVN guru, aka Casper, has an
idea how
to do this?
The TortiseSVN folk have a little utility:
"SubWCRev.exe: a small command line tool which you can use in your
build steps. It takes a file as an argument and replaces all "$WCREV$"
strings with the revision of your working copy. This is useful if you
want to include the Subversion revision in the version of your
project. If you need an example, check out the TortoiseSVN source
and/or have a look at the small help file."
http://tortoisesvn.tigris.org/download.html
SubWCRev could be the solution, but it is not available under Linux,
unless via WinE:
SubWCRev reads the Subversion status of all files in a
working copy, excluding externals. Then the highest revision
number found is used to replace all occurrences of "$WCREV$"
in SrcVersionFile and the result is saved to DstVersionFile.
The commit date/time of the highest revision is used to replace
all occurrences of "$WCDATE$". The modification status is used
to replace all occurrences of "$WCMODS?TrueText:FalseText$" with
TrueText if there are local modifications, or FalseText if not.
usage: SubWCRev WorkingCopyPath [SrcVersionFile] [DstVersionFile] [-n|-d]
Params:
WorkingCopyPath : path to a Subversion working copy
SrcVersionFile : path to a template header file
DstVersionFile : path to where to save the resulting header file
-n : if given, then SubWCRev will error if the working
copy contains local modifications
-d : if given, then SubWCRev will only do its job if
DstVersionFile does not exist