Tom Knowlton
asked on
Hook into commit to create a version text file?
Thanks to the kind folks here on EE, I am now able to run the following from a command prompt:
C:\>svnversion.exe -n MasterDev_SVN > MasterDev_SVN\MasterDev\We bsite\Camp us~1\v
er.txt
and it will create a text file with information on what revision I am on:
1:36M
(as an example)
My question now becomes...how can I make the creation of this file automatic when I do a SVN Commit?
I recently did something like this where SVN would not allow me to edit an existing log file and I created a batch file to override that restriction.
I imagine the same thing applies here....I just need some guidance....detailed guidance please. :) :P
C:\>svnversion.exe -n MasterDev_SVN > MasterDev_SVN\MasterDev\We
er.txt
and it will create a text file with information on what revision I am on:
1:36M
(as an example)
My question now becomes...how can I make the creation of this file automatic when I do a SVN Commit?
I recently did something like this where SVN would not allow me to edit an existing log file and I created a batch file to override that restriction.
I imagine the same thing applies here....I just need some guidance....detailed guidance please. :) :P
ASKER
I am very confused.
>>>>You do not want to execute it on commit.
Why?
>>>>You do not need the file in a repository.
Why don't I?
>>>>You need to create a file only for a copy running on a web server. Create it there every time after you update it.
I only have SVN on my local machine. That is where I do my commits.
>>>What do you do to update the web server?
I create a remote connection to the web server and then copy the files from my development machine up to the web server.
>>>>You do not want to execute it on commit.
Why?
>>>>You do not need the file in a repository.
Why don't I?
>>>>You need to create a file only for a copy running on a web server. Create it there every time after you update it.
I only have SVN on my local machine. That is where I do my commits.
>>>What do you do to update the web server?
I create a remote connection to the web server and then copy the files from my development machine up to the web server.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
>>>>Then create a batch file to copy the files and add executing svnversion at the end.
I've been considering this for a while....perhaps it is time to go ahead and do it.
Thank you for the recommendations!!
Tom
I've been considering this for a while....perhaps it is time to go ahead and do it.
Thank you for the recommendations!!
Tom
ASKER
thx
What do you do to update the web server?