-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
39 lines (35 loc) · 1.79 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
<?xml version="1.0"?>
<project name="php-sdk" default="build-docs" description="Apigee PHP SDK Documentation build">
<target name="clean">
<phingcall target="display-step">
<param name="message" value="Cleaning docs directories" />
</phingcall>
<exec command="git checkout master" dir="${project.basedir}" logoutput="true" />
<exec command="git pull" dir="${project.basedir}" logoutput="true" />
<delete dir="${project.basedir}/docs" quiet="true" failonerror="false" includeemptydirs="true" />
<mkdir dir="${project.basedir}/docs" />
</target>
<target name="build-docs" depends="clean">
<phingcall target="display-step">
<param name="message" value="Generating docs: /usr/bin/apigen generate --source='${project.basedir}/Apigee' --destination='${project.basedir}/docs'" />
</phingcall>
<exec command="/usr/bin/apigen generate --source='${project.basedir}/Apigee' --destination='${project.basedir}/docs' --debug" checkreturn="true" logoutput="true" />
<exec command="git add docs/*" dir="${project.basedir}" logoutput="true" checkreturn="true" />
<exec command="git commit -m 'adding docs ${env.BUILD_ID}'" dir="${project.basedir}" logoutput="true" checkreturn="true" />
<exec command="git push origin master" dir="${project.basedir}" logoutput="true" checkreturn="true" />
<delete dir="${project.basedir}" quiet="true" failonerror="false" includeemptydirs="true" />
</target>
<target name="display-step">
<echo> </echo>
<echo> </echo>
<echo>/** </echo>
<echo>* -------------------------------------------------</echo>
<echo>*</echo>
<echo>* => ${message}</echo>
<echo>*</echo>
<echo>* -------------------------------------------------</echo>
<echo>*/</echo>
<echo> </echo>
<echo> </echo>
</target>
</project>