I'm using it in the following way. During the build, the makefile picks up the revision number from the environment variable and creates a cpp macro definition with it, something like this: gcc -DBUILD_REVISION=$(SVN_REVISION) ... In the C code, I'm printing a version string in the binary: printf("TheGreatesCodeEver %d.%d SVN@ %d",MAJOR_VERSION_NUMBER,MINOR_VERSION_NUMBER,BUILD_REVISION) and the output will be something like: "TheGreatesCodeEver 1.2 SVN@356"
Now the problem is that if someone wants to look for the build in Jenkins, it won't be necessary able to identify the build because build page might show a number less than 356. p.s.: you might say that I should use the environment variable "BUILD_NUMBER" which will identify clearly the build in Jenkins, however the inconsistency between SVN numbers will still exist On Jun 7, 11:57 am, Les Mikesell <lesmikes...@gmail.com> wrote: > On Thu, Jun 7, 2012 at 8:05 AM, pmon <pmon.m...@gmail.com> wrote: > > That's agreed. > > > But it doesn't mean that Jenkins should be picking up "current > > revision" for the build env. variable and show "last changed" on the > > build page. > > In practice there should be no difference in using either number (or > anything in between - the difference doesn't have to be 1) when > referring to that path in the repository since the state is unchanged. > Are you using the revision number to mean something outside of > subversion? > > -- > Les Mikesell > lesmikes...@gmail.com