Skip to content

Commit

Permalink
Prepare the automatic build of releases
Browse files Browse the repository at this point in the history
  • Loading branch information
seblucas committed Oct 15, 2016
1 parent 2d50916 commit fb13c53
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,21 @@ env:

sudo: false

before_deploy:
- composer install phing
- phing
- export RELEASE_FILE=$(ls ./cops-*.zip)

deploy:
provider: releases
api_key:
secure: kNFtDsBbAGRgAYD7KHFMORsItciahDz88AjhpQbtFAN1Nrz4EIQA+0jpS7+5NYHsnb4LMcuH/BubopNlpoumy+IrUZ3+64D+NcK50YmK0sPhM1aAtEIDlXnivIvqFemzW2lCv9vvJjbmJFI1zcH877aBODJB81N6hA5zbSbIszA=
skip_cleanup: true
file:
- "${RELEASE_FILE}"
on:
tags: true
repo: seblucas/cops
php: 5.6


13 changes: 11 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<delete>
<fileset dir=".">
<include name="cops.zip" />
<include name="cops-*.zip" />
</fileset>
</delete>
</target>
Expand All @@ -15,8 +16,17 @@
<!-- ============================================ -->
<target name="dist" depends="clean">
<echo msg="Creating archive..." />
<property environment="env" />
<property name="cops.release.filename" value="cops.zip"/>
<if>
<isset property="env.TRAVIS_TAG" />
<then>
<property name="cops.release.filename" value="cops-${env.TRAVIS_TAG}.zip" override="true" />
</then>
</if>

<zip destfile="cops.zip">

<zip destfile="${cops.release.filename}">
<fileset dir=".">
<include name="**" />
<exclude name="test/**" />
Expand All @@ -28,7 +38,6 @@
<exclude name="resources/epub-loader/**" />
<exclude name="*.phar" />
<exclude name="*.zip" />
<exclude name="*.zip" />
<exclude name="*.xml" />
<exclude name=".travis.yml" />
<exclude name=".coveralls.yml" />
Expand Down

0 comments on commit fb13c53

Please sign in to comment.