forked from jdseibert/Cumulus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
89 lines (75 loc) · 3.95 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<project name="Cumulus" default="deploy" basedir="." xmlns:sf="antlib:com.salesforce">
<!-- Load the package requirements from version.properties -->
<loadproperties srcFile="${basedir}/version.properties"/>
<!-- Load environment variables -->
<property environment="env" />
<!-- Check if the CUMULUSCI_PATH environment variable is set -->
<fail>
<condition>
<not><isset property="env.CUMULUSCI_PATH" /></not>
</condition>
CUMULUSCI_PATH is Required!
This project uses the CumulusCI build scripts which must be checked out and referenced in an environment variable before you can run the build scripts.
To configure the build scripts, do the following:
1. Clone the CumulusCI GitHub repository to a local folder: https://github.com/SalesforceFoundation/CumulusCI
2. Set the CUMULUSCI_PATH environment variable to the path to CumulusCI
If you are on a unix based system, the following commands should work:
git clone https://github.com/SalesforceFoundation/CumulusCI ~/CumulusCI
export CUMULUSCI_PATH=~/CumulusCI
</fail>
<!-- Load CumulusCI build targets -->
<import file="${env.CUMULUSCI_PATH}/build/build.xml" />
<!-- Add project specific build targets and CumulusCI overrides here -->
<target name="preUpdateRequiredPackages">
<!-- npsp depends on all other packages. If it is installed and other packages need to be downgraded (uninstalled), uninstall npsp first -->
<if>
<and>
<not>
<equals arg1="${InstalledPackage.npsp.versionNumber}" arg2="Not Installed" />
</not>
<or>
<bool>
<isgreaterthan arg1="${InstalledPackage.npe01.versionNumber}" arg2="version.npe01" />
</bool>
<bool>
<isgreaterthan arg1="${InstalledPackage.npo02.versionNumber}" arg2="version.npo02" />
</bool>
<bool>
<isgreaterthan arg1="${InstalledPackage.npe03.versionNumber}" arg2="version.npe03" />
</bool>
<bool>
<isgreaterthan arg1="${InstalledPackage.npe4.versionNumber}" arg2="version.npe4" />
</bool>
<bool>
<isgreaterthan arg1="${InstalledPackage.npe5.versionNumber}" arg2="version.npe5" />
</bool>
</or>
</and>
<then>
<echo>Uninstalling npsp ${InstalledPackage.npsp.versionNumber} to allow for downgrade</echo>
<uninstallPackage namespace="npsp" username="${sf.username}" password="${sf.password}" />
<!-- Override the cached installed version of npsp so we don't have to fetch versions again -->
<var name="InstalledPackage.npsp.versionNumber" value="Not Installed" />
</then>
</if>
<!-- npo02 depends on npe01 so we have to uninstall npo02 first if npo02 needs downgraded -->
<if>
<and>
<!-- npo02 is installed -->
<not>
<equals arg1="${InstalledPackage.npo02.versionNumber}" arg2="Not Installed" />
</not>
<!-- and npe01 need downgraded -->
<bool>
<isgreaterthan arg1="${InstalledPackage.npe01.versionNumber}" arg2="${version.npe01}" />
</bool>
</and>
<then>
<echo>Uninstalling npo02 ${InstalledPackage.npe01.versionNumber} to allow for npe01 downgrade</echo>
<uninstallPackage namespace="npo02" username="${sf.username}" password="${sf.password}" />
<!-- Override the cached installed version of npo02 so we don't have to fetch versions again -->
<var name="InstalledPackage.npo02.versionNumber" value="Not Installed" />
</then>
</if>
</target>
</project>