forked from PHPIDS/PHPIDS
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
69 lines (61 loc) · 2.62 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<project name="PHPIDS" default="tests">
<target name="tests" unless="tests.disabled">
<exec executable="phpunit" failonerror="true"/>
</target>
<target name="docs">
<phpdoc
title="PHPIDS documentation"
destdir="docs"
quiet="true"
sourcecode="true"
output="Html:frames:default"
defaultpackagename="PHPIDS"
defaultcategoryname="PHPIDS">
<fileset dir="lib">
<include name="**/*.php"/>
</fileset>
</phpdoc>
</target>
<target name="revert">
<exec executable="git">
<arg value="reset"/>
<arg value="--hard"/>
<arg value="HEAD"/>
</exec>
</target>
<target
name="release"
if="release.version"
depends="revert,tests,release.version,release.tarball,release.checksum"
description="Create release tarball and checksums. Use -Drelease.version=<version>"/>
<target name="release.version" if="release.version">
<replace dir="lib/IDS" value=""${release.version}"">
<include name="Version.php"/>
<replacetoken>'master'</replacetoken>
</replace>
</target>
<target name="release.tarball" if="release.version">
<property name="release.name" value="phpids-${release.version}"/>
<property name="release.tarball.bzip2" value="${release.name}.tar.bz2"/>
<property name="release.tarball.gzip" value="${release.name}.tar.gz"/>
<property name="release.tarball.zip" value="${release.name}.zip"/>
<property name="release.excludes" value="phpids-*"/>
<tar destfile="${release.tarball.bzip2}" compression="bzip2" excludes="${release.excludes}" longfile="gnu">
<tarfileset dir="${basedir}" prefix="${release.name}" excludes="${release.excludes}"/>
</tar>
<tar destfile="${release.tarball.gzip}" compression="gzip" longfile="gnu">
<tarfileset dir="${basedir}" prefix="${release.name}" excludes="${release.excludes}"/>
</tar>
<zip destfile="${release.tarball.zip}" excludes="${release.excludes}">
<zipfileset dir="${basedir}" prefix="${release.name}" excludes="${release.excludes}"/>
</zip>
</target>
<target name="release.checksum">
<checksum file="${release.tarball.bzip2}" algorithm="sha1"/>
<checksum file="${release.tarball.bzip2}" algorithm="md5"/>
<checksum file="${release.tarball.gzip}" algorithm="sha1"/>
<checksum file="${release.tarball.gzip}" algorithm="md5"/>
<checksum file="${release.tarball.zip}" algorithm="sha1"/>
<checksum file="${release.tarball.zip}" algorithm="md5"/>
</target>
</project>