forked from rickvannierop/SFDC-CI-Win
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployMetadata.bat
32 lines (26 loc) · 1.33 KB
/
deployMetadata.bat
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
::@echo off
Set CHECKONLY=TRUE
if [%1]==[] goto blank ::SFUSER
if [%2]==[] goto blank ::SFPWTOKEN
if [%3]==[] goto blank ::SFSERVER
if [%4]==[] goto blank ::SRCFOLDER
if [%5]==[] goto blank ::BUILDFILE
if [%6]==[] goto blank ::OUTPUTLOGFILE
if "%7"=="FALSE" Set CHECKONLY=FALSE
if NOT [%8]==[] ( SET DEPLOYHOOKCONFIG=%8)
goto run
:blank
echo Usage: deployMetadata ^[SFUSER^] ^[SFPWTOKEN^] ^[SFSERVER^] ^[PACKAGEFOLDER^] ^[BUILDFILE^] ^[OUTPUTLOGFILE^] ^<^[CHECKONLY^]^> ^<^[DEPLOYHOOKCONFIG^]^>
echo Eg. deployMetadata [email protected] SOID23YFSKJD login.salesforce.com c:\package\sprint2 build.xml C:\log\tmp.log FALSE
echo Checkonly is TRUE by default. To do an actual deploy use FALSE as last parameter.
echo Invalid parameters: ant -S -l %6 -f %5 %SFLIB% deployPackage -DSFUSER=%1 -DSFPWTOKEN=%2 -DSFSERVER=%3 -DPACKAGEFOLDER=%4 -DSFCHECKONLY=%CHECKONLY% -DDEPLOYHOOKCONFIG=%DEPLOYHOOKCONFIG% -DDEPLOYHOOKSCRIPT=%SCRIPTDIR%\hooks\hooks.js >> %TMPLOGFILE%
EXIT /B 1
goto end
:run
call ant -l %6 -f %5 %SFLIB% deployPackage -DSFUSER=%1 -DSFPWTOKEN=%2 -DSFSERVER=%3 -DPACKAGEFOLDER=%4 -DSFCHECKONLY=%CHECKONLY% -DDEPLOYHOOKCONFIG=%DEPLOYHOOKCONFIG% -DDEPLOYHOOKSCRIPT=%SCRIPTDIR%\hooks\hooks.js -DANTLIB=%ANTLIB% -DDESTINATION=%REQENV%
IF NOT "%errorlevel%"=="0" goto anterror
GOTO end
:anterror
ECHO Error retrieving metadata. (%errorlevel%)
EXIT /B 1
:end