source: src/webapp/build.xml@ 46eee06

debian/bullseye
Last change on this file since 46eee06 was 46eee06, checked in by Joachim Langenbach <joachim.langenbach@…>, 8 years ago

Moved common files and data (like color scheme) into new folder common. Adapted webclient to use the common files.

  • Property mode set to 100644
File size: 3.6 KB
RevLine 
[e82ce68]1<?xml version="1.0" encoding="UTF-8"?>
2<project name="GNUBoatWebApp" default="dist">
3
[e62038b]4 <property name="builddir" value="../../build/webapp" override="true" />
[e82ce68]5
[46eee06]6 <fileset dir="./common/resources/" id="filesCommonResources">
7 </fileset>
8 <fileset dir="./common/css/" id="filesCommonCss">
9 </fileset>
10 <fileset dir="../icon/" id="filesGnuboatIcons">
11 <include name="gnuboat-256-256-transparent.png"/>
12 </fileset>
13
[e82ce68]14 <target name="prepare">
15 <echo msg="Making directory ${builddir}" />
16 <mkdir dir="${builddir}"/>
17 </target>
[6f38643]18 <target name="buildwebclient" depends="prepare">
[e82ce68]19 <echo msg="Copying files to build directory"/>
[24d4504]20 <fileset dir="./webclient" id="filesWebclient">
[e82ce68]21 <!-- <exclude name=""/> -->
22 </fileset>
23
[6f38643]24 <copy todir="${builddir}/webclient">
[24d4504]25 <fileset refid="filesWebclient"/>
[e82ce68]26 </copy>
[6f38643]27 <copy todir="${builddir}/webclient/resources">
[5149714]28 <fileset refid="filesGnuboatIcons"/>
[e82ce68]29 </copy>
[46eee06]30
31 <copy todir="${builddir}/webclient/resources">
32 <fileset refid="filesCommonResources"/>
33 </copy>
34 <copy todir="${builddir}/webclient/css">
35 <fileset refid="filesCommonCss"/>
36 </copy>
[6f38643]37 </target>
38 <target name="buildwebservice" depends="prepare">
[89c32b1]39 <fileset dir="./webservice" id="filesWebservice">
[f03591a]40 <exclude name="mbtiles/**"/>
[c455d7b]41 <exclude name="tests/**"/>
[a50c18f]42 <exclude name="config/**"/>
[89c32b1]43 </fileset>
[6f38643]44 <fileset dir="./webservice/mbtiles" id="filesWebserviceMaps">
45 <!-- <exclude name=""/> -->
46 </fileset>
47
48 <copy todir="${builddir}/webservice">
49 <fileset refid="filesWebservice"/>
50 </copy>
[f03591a]51 <copy todir="${builddir}/webservice/maps">
[6f38643]52 <fileset refid="filesWebserviceMaps"/>
53 </copy>
[e82ce68]54 </target>
55
56 <fileset dir="${builddir}" id="filesWebApp"/>
57
58
[86442cb]59 <target name="dist" depends="buildwebservice,buildwebclient,test">
[e82ce68]60 <echo msg="Creating archive"/>
[008bce9]61 <tar destfile="${builddir}/..//gnuboat-webapp.tar.gz" compression="gzip">
[e82ce68]62 <fileset refid="filesWebApp"/>
[008bce9]63 </tar>
[c455d7b]64 <echo msg="Files copied and compressed in build directory weblcient.tar.gz OK!" />
[e82ce68]65 </target>
[008bce9]66
67 <target name="testdist" depends="buildwebservice,buildwebclient,test">
[e82ce68]68 <echo msg="Install project into ${user.home}/public_html/gnuboat"/>
[a50c18f]69 <fileset id="filesConfig" dir="./webservice/config">
[008bce9]70 <include name="config.php"/>
71 </fileset>
[a50c18f]72 <fileset id="filesLogs" dir="./webservice/tests/logs">
[008bce9]73 <include name="*.log"/>
74 </fileset>
75
[e82ce68]76 <copy todir="${user.home}/public_html/gnuboat">
77 <fileset refid="filesWebApp"/>
78 </copy>
[a50c18f]79 <copy todir="${user.home}/public_html/gnuboat/webservice/tests/logs">
[008bce9]80 <fileset refid="filesLogs"/>
81 </copy>
82 <copy todir="${user.home}/public_html/gnuboat/webservice/config">
83 <fileset refid="filesConfig"/>
84 </copy>
[e82ce68]85 </target>
[3c9166b]86
[86442cb]87 <target name="test">
[c0e66e6]88 <exec command="php phpunit-7.4.3.phar" passthru="true" checkreturn="true"/>
[0662b2d]89 <!--<phpunit pharlocation="phpunit-4.8.9.phar" configuration="phpunit.xml" haltonfailure="true" haltonerror="true" printsummary="true" codecoverage="false">
90 <formatter type="plain" usefile="false"/> -->
[008bce9]91 <!--<formatter type="JUnit" usefile="true"/>-->
[0662b2d]92<!-- <batchtest>
[86442cb]93 <fileset dir="webservice">
94 <include name="tests/*Test.php"/>
95 </fileset>
96 </batchtest>
[0662b2d]97 </phpunit>-->
[86442cb]98 </target>
[3c9166b]99
[573626d]100 <target name="testdist-sample-logs" depends="testdist">
[3c9166b]101 <echo msg="Install sample logs"/>
[573626d]102 <fileset id="filesSampleLogs" dir="../../sample-logs">
[3c9166b]103 <include name="*.log"/>
104 </fileset>
[573626d]105 <fileset id="filesCalcLogs" dir="../../sample-logs/calc-demo">
[3c9166b]106 <include name="*.log"/>
107 </fileset>
108 <copy todir="${user.home}/public_html/gnuboat/webservice/tests/logs">
109 <fileset refid="filesSampleLogs"/>
110 <fileset refid="filesCalcLogs"/>
111 </copy>
112 </target>
[e82ce68]113</project>
Note: See TracBrowser for help on using the repository browser.