Skip to content

Commit fb13c53

Browse files
committed
Prepare the automatic build of releases
1 parent 2d50916 commit fb13c53

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

.travis.yml

+18
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,21 @@ env:
3535

3636
sudo: false
3737

38+
before_deploy:
39+
- composer install phing
40+
- phing
41+
- export RELEASE_FILE=$(ls ./cops-*.zip)
42+
43+
deploy:
44+
provider: releases
45+
api_key:
46+
secure: kNFtDsBbAGRgAYD7KHFMORsItciahDz88AjhpQbtFAN1Nrz4EIQA+0jpS7+5NYHsnb4LMcuH/BubopNlpoumy+IrUZ3+64D+NcK50YmK0sPhM1aAtEIDlXnivIvqFemzW2lCv9vvJjbmJFI1zcH877aBODJB81N6hA5zbSbIszA=
47+
skip_cleanup: true
48+
file:
49+
- "${RELEASE_FILE}"
50+
on:
51+
tags: true
52+
repo: seblucas/cops
53+
php: 5.6
54+
55+

build.xml

+11-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<delete>
66
<fileset dir=".">
77
<include name="cops.zip" />
8+
<include name="cops-*.zip" />
89
</fileset>
910
</delete>
1011
</target>
@@ -15,8 +16,17 @@
1516
<!-- ============================================ -->
1617
<target name="dist" depends="clean">
1718
<echo msg="Creating archive..." />
19+
<property environment="env" />
20+
<property name="cops.release.filename" value="cops.zip"/>
21+
<if>
22+
<isset property="env.TRAVIS_TAG" />
23+
<then>
24+
<property name="cops.release.filename" value="cops-${env.TRAVIS_TAG}.zip" override="true" />
25+
</then>
26+
</if>
1827

19-
<zip destfile="cops.zip">
28+
29+
<zip destfile="${cops.release.filename}">
2030
<fileset dir=".">
2131
<include name="**" />
2232
<exclude name="test/**" />
@@ -28,7 +38,6 @@
2838
<exclude name="resources/epub-loader/**" />
2939
<exclude name="*.phar" />
3040
<exclude name="*.zip" />
31-
<exclude name="*.zip" />
3241
<exclude name="*.xml" />
3342
<exclude name=".travis.yml" />
3443
<exclude name=".coveralls.yml" />

0 commit comments

Comments
 (0)