1@ echo off
2
3REM script which executes build
4
5REM tag to use when checking out .map file project
6set mapVersionTag=HEAD
7
8REM default setting for buildType
9set buildType=
10
11REM default setting for buildID
12set buildID=
13
14REM default bootclasspath
15set bootclasspath=
16
17REM vm used to run the build.  Defaults to java on system path
18set vm=java
19
20REM target used if not default (to allow run just a portion of buildAll)
21set target=
22
23REM FTP user/password, required for Windows to ftp. Without it, no push.
24set ftpUser=
25set ftpPassword=
26
27if x%1==x goto usage
28
29:processcmdlineargs
30
31REM ****************************************************************
32REM
33REM Process command line arguments
34REM
35REM ****************************************************************
36if x%1==x goto run
37if x%1==x-mapVersionTag set mapVersionTag=%2 && shift && shift && goto processcmdlineargs
38if x%1==x-vm set vm=%2 && shift && shift && goto processcmdlineargs
39if x%1==x-bc set bootclasspath=-Dbootclasspath=%2 && shift && shift && goto processcmdlineargs
40if x%1==x-target set target=%2 && shift && shift && goto processcmdlineargs
41if x%1==x-buildID set buildID=-DbuildId=%2 && shift && shift && goto processcmdlineargs
42if x%1==x-ftp set ftpUser=-DftpUser=%2 && set ftpPassword=-DftpPassword=%3 && shift && shift && shift && goto processcmdlineargs
43set buildType=%1 && shift && goto processcmdlineargs
44
45:run
46if x%buildType%==x goto usage
47
48%vm% -cp ..\org.eclipse.releng.basebuilder\startup.jar org.eclipse.core.launcher.Main -application org.eclipse.ant.core.antRunner -f buildAll.xml %target% %bootclasspath% -DmapVersionTag=%mapVersionTag% -DbuildType=%buildType% %buildID% %ftpUser% %ftpPassword%
49goto end
50
51:usage
52echo "usage: buildAll [-mapVersionTag HEAD|<branch name>] [-vm <url to java executable to run build>] [-bc <bootclasspath>] [-target <buildall target to execute>] [-buildID <buildID, e.g. 2.1.2>]  [-ftp <userid> <password>] I|M"
53
54:end