|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
||||
|
||||
|
Easy way to access SVN revision in code?
Hello Chief-Delphi,
Our team uses a Subversion server to revise and store our code, and I was wondering if anyone knows a good, platform-independent way to access the SVN revision from within the code of the program. I've seen a ANT build script that uses svnversion, but that would only work properly on Linux or OSX machines, and it doesn't use the SVN client built-in to NetBeans on Windows. If anyone has a good method of achieving this, I'd love to know It'd be very helpful for the team I'm in, and likely many others that use Version Control.-Sean "CyberKitsune" Lead Programmer for the NeoBots |
|
#2
|
|||
|
|||
|
Re: Easy way to access SVN revision in code?
For the automated builds of the C++ WPILib libraries we use sliksvn (a command line svn tool) and a .vbs script that executes an svn command and gets the version number. It uses it to name the installer based on the svn version number.
Brad |
|
#3
|
||||
|
||||
|
Re: Easy way to access SVN revision in code?
Quote:
Do you know if there is an easy way to do this with Java's build system? (ANT) |
|
#4
|
|||
|
|||
|
Re: Easy way to access SVN revision in code?
This works for ant:
<condition property="isWindows"> <os family="windows" /> </condition> <target name="do.run.Windows" if="isWindows"> <exec executable="cmd" dir="${your-target-dir}" > <arg line="/C command-to-run arg1 arg2 arg3" /> </exec> </target> |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|