I'm wondering how do you deal with displaying release revision number when pushing live new versions of your app?
You can use $Rev$
in a file to get latest revision, but only after you update the file.
What if I want to update a string in one file every time I change any file in the repository/directory?
Is there a way?
The best way to do this is have a build script for releases that will determine the revision number using svnversion
or svn info
and insert it into a file. It's always helpful to have a script which:
svnversion
or something similar to compute a build numberThen you have a one-step process to create a release with an easily identifiable version. It also helps you avoid giving someone a build from your own working copy, which may have changes that were never checked into source control.
There is a simple tool in TortoiseSVN named SubWCRev.exe. It takes revision from path and create file from your own template. You can use it as prebuild command.
Did you try to use hooks? They work on server-side only but may do the trick. Otherwise I would just call a script do update the revision if the keywords aren't suitable for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With