This repository was archived by the owner on Sep 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
64 lines (64 loc) · 3.17 KB
/
build.xml
File metadata and controls
64 lines (64 loc) · 3.17 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
<?xml version="1.0" encoding="UTF-8"?>
<project name="J!Analyics" default="copyfiles" basedir=".">
<property name="version" value="3.0.0" />
<property name="src" value="."/>
<property name="test_mod" value="/var/www/test/modules/mod_janalytics" />
<property name="test_lang" value="/var/www/test/language" />
<target name="copyfiles" description="Copies files to test project.">
<echo message="Running build.xml. Copying files from dev to test..." />
<copy file="${src}/mod_janalytics.php" todir="${test_mod}"/>
<copy file="${src}/mod_janalytics.xml" todir="${test_mod}"/>
<copy file="${src}/tmpl/default.php" todir="${test_mod}/tmpl"/>
<copy file="${src}/tmpl/index.html" todir="${test_mod}/tmpl"/>
<copy file="${src}/languages/en-GB.mod_janalytics.ini" todir="${test_lang}/en-GB"/>
</target>
<target name="removefiles" description="Remove files in test project.">
<echo message="Running build.xml. Remove files from test..." />
<delete dir="${test_mod}"/>
<delete file="${test_lang}/en-GB/en-GB.mod_janalytics.ini" />
</target>
<target name="tar" description="Create Tarball distribution package.">
<echo message="Creating Tarball archive..." />
<tar destfile="../mod_janalytics-${version}.tar.gz"
compression="gzip"
basedir="."
excludes=".project, build.xml, mod_janalytics-${version}.*"
/>
<echo message="Tarball created." />
</target>
<target name="zip" description="Create Zip distribution package.">
<echo message="Creating Zip archive..." />
<zip destfile="../mod_janalytics-${version}.zip"
basedir="."
excludes=".project, build.xml, mod_janalytics-${version}.*"
/>
<echo message="Zip created." />
</target>
<target name="fixperms" description="Fix project file permissions">
<echo message="Fixing file owner and permissions..." />
<echo message=" - Setting owner to www-data for all files and directories..." />
<chown owner="www-data" type="both">
<fileset dir="${test_mod}">
<include name="**" />
</fileset>
</chown>
<echo message=" - Setting group to www-data for all files and directories..." />
<chgrp group="www-data" type="both">
<fileset dir="${test_mod}">
<include name="**" />
</fileset>
</chgrp>
<echo message=" - Setting permissions to 664 for all files..." />
<chmod perm="664" type="file">
<fileset dir="${test_mod}">
<include name="**/*.*" />
</fileset>
</chmod>
<echo message=" - Setting permissions to 775 for all directories..." />
<chmod perm="775" type="dir">
<dirset dir="${test_mod}">
<include name="**" />
</dirset>
</chmod>
</target>
</project>