Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
I'd like to ask our *nix teammembers if they know of a good program that can mimic the subwcrev utility and runs on their *nix.
I'd like to include the revision number in the MCS build; I'd use subwcrev for Windows builds, but have no idea about *nix builds. Would anyone suggest a reasonable solution?
Thanks.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
Not exactly what I had in mind, but close enough.
I can't do a similar thing for windows, so instead I need the svnversion or whatever tool to process a file, WCVersion.h, that only contains the SVN revision number defined as a macro. On Windows, I can make that file a .template and it will be automagically processed into the correct header by subwcrev; I'm looking for a similar way in *nix. Thus:
WCVersion.h.template contents:
#define WCREV $WCREV$
From that, subwcrev generates WCVersion.h:
#define WCREV 340
Whichever file in the project needs the revision number, just does an #include "WCVersion.h"
Can this be done easily on *nix?
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
I'd prefer something that could actually replace things in WCVersion.h, rather than synthetizing it from scratch. If we ever decide to put something else into the file (such as last commit's date etc.)