dan_linder
dan_linder

Reputation: 1026

Bump a file's version number

I have a build script that I use to produce my install files. To keep the internal version subversion numbers in sync, I append a blank line to the end of the script files, then do another check-in to bump the version number in all the files to the same value. I then use this value in the script like this:

REVISION="$Rev: 58 $"

Is there a cleaner way rather than adding the blank line? I tried using "touch" but Subversion reference see the timestamp change.

Upvotes: 1

Views: 965

Answers (2)

the_mandrill
the_mandrill

Reputation: 30862

One alternative is for your script to run svnversion and dump the output of that to the file, so that the contents of the file will genuinely change every time. Or you could try just touching your file then committing with the -f flag to force the commit

Upvotes: 1

Cédric Julien
Cédric Julien

Reputation: 80851

Set the svn:keywords property on the files where you want this

   svn:keywords : LastChangedRevision 

Subversion will fill in the revision number when the LastChangedRevision keyword occurs in the file, like this:

$LastChangedRevision: 28 $

Upvotes: 1

Related Questions