Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SET REV=%2
- SET REPOS=%1
- SET DIR=%REPOS%\hooks
- SET REPOS=%REPOS:C:\Repositories\=%
- SET WORKING_COPY=\\192.168.222.41\Web01-Inetpub\%REPOS%.
- SET PATH=%PATH%;%DIR%;C:\Utils\;C:\Program Files\VisualSVN Server\Bin
- SET SVN_USER=svnusernamehere
- SET SVN_PASS=svnpasswordhere
- SET SMTP_SERVER=smtpserveraddresshere
- SET SMTP_USER=smtpusername
- SET SMTP_PASS=smtppassword
- SET SUBJECT=SVN Update - %REPOS% - Revision %REV%
- REM Push update to working copy directory
- svn.exe update %WORKING_COPY% --quiet --non-interactive --username %SVN_USER% --password %SVN_PASS%
- REM Write revision number to .revision file in working copy directory
- ECHO %REV% > %WORKING_COPY%\.revision
- REM Send notification email of changes
- ECHO The following changes were made to the code: > %DIR%\email.txt
- ECHO. >> %DIR%\email.txt
- svn log %WORKING_COPY% -v -r "%REV%" --non-interactive --username %SVN_USER% --password %SVN_PASS% >> %DIR%/email.txt
- sendEmail -s %SMTP_SERVER% -t %EMAIL_TO% -f %EMAIL_FROM% -u "%SUBJECT%" -o message-file=%DIR%\email.txt -xu %SMTP_USER% -xp %SMTP_PASS%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement