forked from aimeos/aimeos-typo3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
54 lines (47 loc) · 3 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Aimeos TYPO3 extension" default="update">
<target name="build" description="Updates the translation files">
<exec command="tx pull -a -f --minimum-perc=1" checkreturn="true" logoutput="true" passthru="true" />
</target>
<target name="clean" description="Cleans up build artefacts">
<delete dir="Resources/Libraries/doctrine" includeemptydirs="true" />
<delete dir="typo3conf" includeemptydirs="true" />
<delete dir="typo3_src" includeemptydirs="true" />
<delete dir="public" includeemptydirs="true" />
<delete dir="typo3" includeemptydirs="true" />
<delete file="composer.lock" />
<delete file="index.php" />
</target>
<target name="composer" description="Updates composer dependencies">
<delete dir="Resources/Libraries" includeemptydirs="true" />
<exec command="COMPOSER=composer-ter.json composer remove --no-update --working-dir ${project.basedir} typo3/cms-core typo3/cms-backend typo3/cms-extbase typo3/cms-scheduler bithost-gmbh/pdfviewhelpers" checkreturn="true" logoutput="true" />
<exec command="COMPOSER=composer-ter.json composer update --no-dev --no-autoloader --working-dir ${project.basedir}" checkreturn="true" logoutput="true" passthru="true" />
<exec command="rm -rf Resources/Libraries/tecnickcom/" checkreturn="true" logoutput="true" />
<exec command="COMPOSER=composer-ter.json composer dump-autoload --working-dir ${project.basedir}" checkreturn="true" logoutput="true" />
<exec command="git checkout composer-ter.json" checkreturn="true" logoutput="true" />
</target>
<target name="deploy" description="Creates new package" depends="composer,clean">
<propertyprompt propertyName="version" promptText="Release version" promptCharacter=":" useExistingValue="true"/>
<propertyprompt propertyName="state" promptText="Stablility state" promptCharacter=":" defaultValue="stable"/>
<reflexive>
<fileset dir="." includes="ext_emconf.php" />
<filterchain>
<replaceregexp>
<regexp pattern="'version' => '[^']*'" replace="'version' => '${version}'"/>
<regexp pattern="'state' => '[^']*'" replace="'state' => '${state}'"/>
</replaceregexp>
</filterchain>
</reflexive>
<exec command="zip -r ../aimeos_${version}.zip * -x \*/build.xml -x composer.lock -x \*/.git/\* -x \*/tests/\* -x \*/.tx/\* -x \*/.travis.yml"
checkreturn="true" logoutput="true"/>
<filehash file="../aimeos_${version}.zip" hashtype="1" />
<echo msg="SHA1 hash value: ${filehashvalue}" />
</target>
<target name="release" description="Creates new release" depends="deploy">
<propertyprompt propertyName="version" promptText="Enter release version" promptCharacter=":" useExistingValue="true"/>
<exec command="git commit -m 'Release ${version}' ext_emconf.php" checkreturn="true" logoutput="true" />
<exec command="git tag ${version}" checkreturn="true" logoutput="true" />
<exec command="git push" checkreturn="true" logoutput="true" />
<exec command="git push --tags" checkreturn="true" logoutput="true" />
</target>
</project>