forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-test-patching-tool.xml
44 lines (35 loc) · 1.35 KB
/
build-test-patching-tool.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
<?xml version="1.0"?>
<project basedir="." name="portal-test-patching-tool" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<macrodef name="patching-tool-command">
<attribute default="${app.server.parent.dir}/patching-tool" name="patching.tool.dir" />
<attribute name="patching.tool.command.args" />
<sequential>
<antcall target="prepare-patching-tool" />
<echo file="${app.server.parent.dir}/.liferay-home">liferay.home=${liferay.home}</echo>
<exec dir="${app.server.parent.dir}/patching-tool" executable="/bin/bash" outputproperty="patching.tool.content.out">
<arg line="patching-tool${file.suffix.bat} @{patching.tool.command.args}" />
</exec>
<echo>${patching.tool.content.out}</echo>
<if>
<contains string="${patching.tool.content.out}" substring="The command has failed." />
<then>
<fail message="Patching Tool failed with the arguments: @{patching.tool.command.args}." />
</then>
<else>
<echo>Patching Tool succeeded with the arguments: @{patching.tool.command.args}.</echo>
</else>
</if>
</sequential>
</macrodef>
<target name="patching-tool-auto-discovery">
<patching-tool-command
patching.tool.command.args="auto-discovery"
/>
</target>
<target name="patching-tool-info">
<patching-tool-command
patching.tool.command.args="info"
/>
</target>
</project>