Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
107 lines (105 sloc) 3.34 KB
<?xml version="1.0" encoding="UTF-8"?>
<project name="github" default="dev_head" basedir=".">
<!-- Project properties -->
<property file="./build.properties" />
<property name="repo.dir" value="." />
<resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />
<property name="version" value="1.0.beta" />
<tstamp>
<format property="build.date" pattern="%Y-%m-%d" />
</tstamp>
<target
name="dev_head"
description="Builds test packages based on the development head"
depends="rebuild-packages,common-files,17-package">
<echo msg="Deleting old master builds" />
<delete quiet="yes" includeemptydirs="true">
<fileset dir="*">
<include name="releases/mod_github_master.zip" />
</fileset>
</delete>
<echo msg="Build 1.7 package" />
<zip destfile="releases/mod_github_master.zip">
<fileset dir="packages/1.7">
<include name="**" />
</fileset>
<fileset dir="packages/common">
<include name="**" />
</fileset>
</zip>
</target>
<target
name="release"
description="Builds release packages based on the development head"
depends="rebuild-packages,common-files,17-package">
<echo msg="Build 1.7 package" />
<zip destfile="releases/mod_github_${version}.zip">
<fileset dir="packages/1.7">
<include name="**" />
</fileset>
<fileset dir="packages/common">
<include name="**" />
</fileset>
</zip>
<echo msg="Creating Git tag" />
<gittag repository="${repo.dir.resolved}" name="${version}" gitPath="/usr/local/git/bin/git" />
<echo msg="Pushing Version commit and tag to GitHub" />
<gitpush repository="${repo.dir.resolved}" gitPath="/usr/local/git/bin/git" />
<gitpush repository="${repo.dir.resolved}" tags="true" gitPath="/usr/local/git/bin/git" />
</target>
<target name="common-files" description="Stages the common files" depends="rebuild-packages">
<echo msg="Create temp folder" />
<mkdir dir="packages/common" />
<echo msg="Copy files" />
<copy todir="packages/common/media">
<fileset dir="media" />
</copy>
<copy todir="packages/common/tmpl">
<fileset dir="tmpl" />
</copy>
<copy todir="packages/common">
<fileset dir=".">
<include name="CHANGELOG" />
<include name="helper.php" />
<include name="index.html" />
<include name="mod_github.php" />
</fileset>
</copy>
</target>
<target name="17-package" description="Builds the 1.7 package" depends="rebuild-packages">
<echo msg="Create 1.7 temp folder" />
<mkdir dir="packages/1.7" />
<echo msg="Create 1.7 language folder" />
<copy todir="packages/1.7/language">
<fileset dir="language/1.7" />
</copy>
<echo msg="Copy 1.7 manifest" />
<copy
file="mod_github.xml"
tofile="packages/1.7/mod_github.xml"
overwrite="true">
<filterchain>
<replacetokens begintoken="##" endtoken="##">
<token key="DATE" value="${build.date}" />
<token key="VERSION" value="${version}" />
</replacetokens>
</filterchain>
</copy>
<echo msg="Copy scriptfile" />
<copy
file="script.php"
tofile="packages/1.7/script.php"
overwrite="true">
</copy>
</target>
<target name="rebuild-packages" description="Delete old packages">
<echo msg="Deleting packages dir" />
<delete quiet="yes" includeemptydirs="true">
<fileset dir="*">
<include name="packages" />
</fileset>
</delete>
<echo msg="Creating packages dir" />
<mkdir dir="packages" />
</target>
</project>
Something went wrong with that request. Please try again.