environment variable
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Are you expecting that the number of the build will match the SVN
revision?
Sent from my Windows Phone
From: pmon
Sent: 6/7/2012 9:21 PM
To: Jenkins Users
Subject: Re: SVN revision number inconsistency between build page and
environment variable
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=3D$(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=C2=A0am, Les Mikesell <[email protected]> wrote:
> On Thu, Jun 7, 2012 at 8:05 AM, pmon <[email protected]> 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.
> =C2=A0 Are you using the revision number to mean something outside of
> subversion?
>
> --
> =C2=A0 =C2=A0Les Mikesell
> =C2=A0 =C2=A0 [email protected]