-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpersonal-build.cmd
More file actions
50 lines (33 loc) · 1.59 KB
/
personal-build.cmd
File metadata and controls
50 lines (33 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
java -jar tools\TeamCity\tcc.jar run --host https://build.deltares.nl -m "delayed commit" -c <buildTypeID> <list of modified files>
goto :eof
@echo off
rem TODO: update revision limit once in a while
set REVISION_LIMIT=11196
rem check if revision is entered as a first argument
if "%1"=="" (
echo !!! BE VERY CAREFUL WITH THIS SCRIPT, THE WHOLE REPOSITORY WILL BE AFFECTED !!!
echo ------------------------------------------
echo Usage: "%~nx0 <revision>"
echo ------------------------------------------
echo "<revision>" - latest stable revision
goto :eof
)
rem typo check
if /I %1 LSS %REVISION_LIMIT% (
echo Revision number: %1 is too small, smaller than %REVISION_LIMIT%
goto :eof
)
rem ask user if he's really sure what he's doing
setlocal
:PROMPT
SET /P AREYOUSURE=Are you sure you want to revert the *WHOLE* Delta Shell repository to revision %1 (Y/[N])?
IF /I "%AREYOUSURE%" NEQ "Y" GOTO :eof
rem do revert
echo Collecting changes for revision range %1:HEAD into revert-%1.diff ...
svn diff -r%1:HEAD https://repos.deltares.nl/repos/delft-tools/trunk/delta-shell > revert-%1.diff
echo Removing trunk in remote repository ...
svn del https://repos.deltares.nl/repos/delft-tools/trunk/delta-shell -m "Reverting to %1 ..."
echo Restoring trunk from revision %1 ...
svn copy https://repos.deltares.nl/repos/delft-tools/trunk/delta-shell@%1 https://repos.deltares.nl/repos/delft-tools/trunk/delta-shell@HEAD -m "Reverting to %1 ..."
echo Done! Don't forget to send an email to happy developers informing them about changes :)
echo Include zipped revert-%1.diff file as an attachment.