Link to home
Start Free TrialLog in
Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America

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\Website\Campus~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
Avatar of NetExpert-Warszawa
NetExpert-Warszawa
Flag of Poland image

You do not want to execute it on commit. You do not need the file in a repository. You need to create a file only for a copy running on a web server. Create it there every time after you update it.

What do you do to update the web server?
Avatar of Tom Knowlton

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.
ASKER CERTIFIED SOLUTION
Avatar of NetExpert-Warszawa
NetExpert-Warszawa
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>>>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
thx