source: src/webapp/build.xml@ c0e66e6

debian/bullseye
Last change on this file since c0e66e6 was c0e66e6, checked in by Joachim Langenbach <joachim.langenbach@…>, 8 years ago
  • Updated Tests to work with PHP 7
    • Added phing phar which works with PHP7 as a choice for the developer
    • Updated phpunit to 7.4.3 which works with PHP7 and removed old PHPUnit version
    • Updated test cases to work with PHPUnit 7.4.3
  • Property mode set to 100644
File size: 3.2 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
6 <target name="prepare">
7 <echo msg="Making directory ${builddir}" />
8 <mkdir dir="${builddir}"/>
9 </target>
[6f38643]10 <target name="buildwebclient" depends="prepare">
[e82ce68]11 <echo msg="Copying files to build directory"/>
[24d4504]12 <fileset dir="./webclient" id="filesWebclient">
[e82ce68]13 <!-- <exclude name=""/> -->
14 </fileset>
[5149714]15 <fileset dir="../icon/" id="filesGnuboatIcons">
16 <include name="gnuboat-256-256-transparent.png"/>
17 </fileset>
[e82ce68]18
[6f38643]19 <copy todir="${builddir}/webclient">
[24d4504]20 <fileset refid="filesWebclient"/>
[e82ce68]21 </copy>
[6f38643]22 <copy todir="${builddir}/webclient/resources">
[5149714]23 <fileset refid="filesGnuboatIcons"/>
[e82ce68]24 </copy>
[6f38643]25 </target>
26 <target name="buildwebservice" depends="prepare">
[89c32b1]27 <fileset dir="./webservice" id="filesWebservice">
[f03591a]28 <exclude name="mbtiles/**"/>
[c455d7b]29 <exclude name="tests/**"/>
[a50c18f]30 <exclude name="config/**"/>
[89c32b1]31 </fileset>
[6f38643]32 <fileset dir="./webservice/mbtiles" id="filesWebserviceMaps">
33 <!-- <exclude name=""/> -->
34 </fileset>
35
36 <copy todir="${builddir}/webservice">
37 <fileset refid="filesWebservice"/>
38 </copy>
[f03591a]39 <copy todir="${builddir}/webservice/maps">
[6f38643]40 <fileset refid="filesWebserviceMaps"/>
41 </copy>
[e82ce68]42 </target>
43
44 <fileset dir="${builddir}" id="filesWebApp"/>
45
46
[86442cb]47 <target name="dist" depends="buildwebservice,buildwebclient,test">
[e82ce68]48 <echo msg="Creating archive"/>
[008bce9]49 <tar destfile="${builddir}/..//gnuboat-webapp.tar.gz" compression="gzip">
[e82ce68]50 <fileset refid="filesWebApp"/>
[008bce9]51 </tar>
[c455d7b]52 <echo msg="Files copied and compressed in build directory weblcient.tar.gz OK!" />
[e82ce68]53 </target>
[008bce9]54
55 <target name="testdist" depends="buildwebservice,buildwebclient,test">
[e82ce68]56 <echo msg="Install project into ${user.home}/public_html/gnuboat"/>
[a50c18f]57 <fileset id="filesConfig" dir="./webservice/config">
[008bce9]58 <include name="config.php"/>
59 </fileset>
[a50c18f]60 <fileset id="filesLogs" dir="./webservice/tests/logs">
[008bce9]61 <include name="*.log"/>
62 </fileset>
63
[e82ce68]64 <copy todir="${user.home}/public_html/gnuboat">
65 <fileset refid="filesWebApp"/>
66 </copy>
[a50c18f]67 <copy todir="${user.home}/public_html/gnuboat/webservice/tests/logs">
[008bce9]68 <fileset refid="filesLogs"/>
69 </copy>
70 <copy todir="${user.home}/public_html/gnuboat/webservice/config">
71 <fileset refid="filesConfig"/>
72 </copy>
[e82ce68]73 </target>
[3c9166b]74
[86442cb]75 <target name="test">
[c0e66e6]76 <exec command="php phpunit-7.4.3.phar" passthru="true" checkreturn="true"/>
[0662b2d]77 <!--<phpunit pharlocation="phpunit-4.8.9.phar" configuration="phpunit.xml" haltonfailure="true" haltonerror="true" printsummary="true" codecoverage="false">
78 <formatter type="plain" usefile="false"/> -->
[008bce9]79 <!--<formatter type="JUnit" usefile="true"/>-->
[0662b2d]80<!-- <batchtest>
[86442cb]81 <fileset dir="webservice">
82 <include name="tests/*Test.php"/>
83 </fileset>
84 </batchtest>
[0662b2d]85 </phpunit>-->
[86442cb]86 </target>
[3c9166b]87
[573626d]88 <target name="testdist-sample-logs" depends="testdist">
[3c9166b]89 <echo msg="Install sample logs"/>
[573626d]90 <fileset id="filesSampleLogs" dir="../../sample-logs">
[3c9166b]91 <include name="*.log"/>
92 </fileset>
[573626d]93 <fileset id="filesCalcLogs" dir="../../sample-logs/calc-demo">
[3c9166b]94 <include name="*.log"/>
95 </fileset>
96 <copy todir="${user.home}/public_html/gnuboat/webservice/tests/logs">
97 <fileset refid="filesSampleLogs"/>
98 <fileset refid="filesCalcLogs"/>
99 </copy>
100 </target>
[e82ce68]101</project>
Note: See TracBrowser for help on using the repository browser.