This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 96
/
build.xml
executable file
·57 lines (48 loc) · 2.85 KB
/
build.xml
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
49
50
51
52
53
54
55
56
57
<project name="DemoAdapter" default="deployCodeCheckOnly" basedir="." xmlns:sf="antlib:com.salesforce">
<condition property="propertiesFile" value="${properties}" else="build.properties">
<isset property="properties" />
</condition>
<property file="${propertiesFile}" />
<property environment="env"/>
<target name="retrieveUnpackaged">
<echo message="Login user : ${sf.username}" />
<echo message="Login server : ${sf.serverurl}" />
<sf:retrieve username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" singlePackage="true" retrieveTarget="${retrieveDir}" unpackaged="${retrieveDir}/package.xml"/>
</target>
<target name="retUnpack">
<echo message="Login user : ${sf.username}" />
<echo message="Login server : ${sf.serverurl}" />
<echo message="Retrieve Directory : ${retrieveDir}" />
<sf:retrieve username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" singlePackage="true" maxPoll="1000" retrieveTarget="${retrieveDir}" unpackaged="${retrieveDir}/package.xml"/>
</target>
<target name="deployAll">
<delete>
<fileset dir="${dev.directory}" includes="**/.DS_Store"/>
</delete>
<echo>Loading Properties: ${propertiesFile}</echo>
<echo message="Login user : ${sf.username}" />
<echo message="Login server : ${sf.serverurl}" />
<sf:deploy username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" deployroot="${dev.directory}" singlePackage="true" maxPoll="5000" ignoreWarnings="true"/>
</target>
<!-- Shows check only; never actually saves to the server -->
<target name="deployCodeCheckOnly">
<delete>
<fileset dir="${dev.directory}" includes="**/.DS_Store"/>
</delete>
<echo message="Login user : ${sf.username}" />
<echo message="Login server : ${sf.serverurl}" />
<sf:deploy username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" deployroot="${dev.directory}" maxPoll="5000" checkOnly="true" ignoreWarnings="true"/>
</target>
<!-- =================================
target: undeploy
================================= -->
<target name="undeploy" description="used to remove deployed code">
<sf:deploy username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" deployroot="${undeploy.directory}" singlepackage="true" maxpoll="5000" runalltests="false"></sf:deploy>
</target>
<!-- =================================
target: undeployCheckOnly
================================= -->
<target name="undeployCheckOnly" description="used to make sure an undeploy of code will work properly">
<sf:deploy username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" deployroot="${undeploy.directory}" singlepackage="true" checkonly="true" maxpoll="2000" runalltests="false"></sf:deploy>
</target>
</project>