-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
52 lines (46 loc) · 1.89 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
<?xml version="1.0" encoding="UTF-8"?>
<project default="antlib" name="http">
<taskdef resource="org/apache/ant/github/antlib.xml">
<classpath path="./ant-github.jar" />
</taskdef>
<taskdef resource="org/realityforge/antix/antlib.xml">
<classpath path="./antix-1.0.0.jar" />
</taskdef>
<target name="setup-properties">
<property name="root" value="." />
<property name="root.bin" value="${root}/bin" />
<property name="root.src" value="${root}/src" />
<property name="common.basedir" value="${root}/common" />
<property name="jarname" value="ant-github.jar" />
</target>
<target name="setup" depends="setup-properties">
<mkdir dir="${root.bin}" />
</target>
<target name="compile" depends="setup">
<javac srcdir="./src" destdir="${root.bin}" includeantruntime="true" />
</target>
<target name="antlib" depends="compile">
<copy todir="${root.bin}">
<fileset dir="./src" includes="**/*.xml,**/*.properties" />
</copy>
<jar destfile="${jarname}">
<fileset dir="${root.bin}" />
<metainf file="NOTICE" />
<metainf file="${common.basedir}/LICENSE" />
</jar>
<copy file="${jarname}" todir="${ant.home}/lib" />
<copy file="${jarname}" todir="${ant.home}/build" />
</target>
<target name="test">
<gitgetpulls username="arbuzov" user="welltime" reponame="well_package" password="int1144282" destinationProperty="test.txt" />
</target>
<target name="getPatches" depends="test">
<sshexec output="debug.txt" trust="yes" host="10.42.0.80" username="root" password="gfhjkmlkzwelltone" command="cd /var/www/well_package;git fetch"/>
<forEach property="patch" list="${test.txt}">
<sequential>
<echo message="Patch: @{patch}" />
<sshexec output="/test/debug.txt" trust="yes" host="10.42.0.80" username="root" password="gfhjkmlkzwelltone" command="cd /var/www/well_package"/>
</sequential>
</forEach>
</target>
</project>