开发者

Bump a file's version number

开发者 https://www.devze.com 2023-03-01 03:59 出处:网络
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

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开发者_Python百科 the blank line? I tried using "touch" but Subversion reference see the timestamp change.


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


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 $

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号