Skip to content

Commit

Permalink
Configure Continuous Integration
Browse files Browse the repository at this point in the history
  • Loading branch information
mcartoixa committed Jan 1, 2018
1 parent 654afa8 commit 97af8d9
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: php
php:
- '5.6'

env:
- DLM_PACKAGE_VERSION=1.0.$TRAVIS_BUILD_NUMBER

install:
- php bin/composer.phar install -q -n

script:
- vendor/bin/phing -f build.xml prepare.version release
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Build
[![Build status](https://travis-ci.org/mcartoixa/synology-dlm-tpb.svg?branch=master)](https://travis-ci.org/mcartoixa/synology-dlm-tpb)
# Installation
- Download the latest version of the module and install it in the [BT Search section of Download Station](https://www.synology.com/en-global/knowledgebase/DSM/help/DownloadStation/download_setup#torrent).

# Development
## Build

- Run the following command from this directory: `build.bat`
- Prerequisites:
Expand Down
14 changes: 13 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<project name="synology-dlm-tpb" default="build">
<autoloader />

<property environment="env" />

<property name="bin.dir" value="${project.basedir}/bin" />
<property name="dlm.dir" value="${project.basedir}/dlm" />
<property name="tmp.dir" value="${project.basedir}/tmp" />
Expand All @@ -15,7 +17,17 @@


<target name="prepare.version" depends="prepare.dlm">
<phing phingfile="build.xml" dir="./dlm" target="prepare.version" inheritAll="true" haltonfailure="true" />
<if>
<and>
<isset property="env.DLM_PACKAGE_VERSION" />
<not>
<equals arg1="${env.DLM_PACKAGE_VERSION}" arg2="0.0.0" />
</not>
</and>
<then>
<phing phingfile="build.xml" dir="./dlm" target="prepare.version" inheritAll="true" haltonfailure="true" />
</then>
</if>
</target>

<target name="prepare.dlm">
Expand Down
2 changes: 1 addition & 1 deletion dlm/INFO
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mcartoixa_thepiratebay",
"displayname": "The Pirate Bay",
"description": "The Pirate Bay search module for Synology Download Manager",
"version": "0.1",
"version": "0.0.0",
"site": "https://piratebay.to/",
"module": "search.php",
"type": "search",
Expand Down
7 changes: 6 additions & 1 deletion dlm/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<project name="mcartoixa_thepiratebay.dlm" default="build">
<autoloader />

<property environment="env" />

<property name="build.bin.dir" value="${tmp.bin.dir}/dlm" />
<property name="build.obj.dir" value="${tmp.obj.dir}/dlm" />
<property name="build.out.dir" value="${tmp.out.dir}/bin" />
Expand All @@ -20,7 +22,10 @@
<target name="rebuild" depends="clean,build" />
<target name="release" depends="rebuild,package" />

<target name="prepare.version" />
<target name="prepare.version">
<echo message="Preparing version ${env.DLM_PACKAGE_VERSION}" />
<replaceregexp file="INFO" pattern="(?&lt;=&quot;version&quot;\W)\s+&quot;\d+\.\d+\.\d+&quot;" replace=" &quot;${env.DLM_PACKAGE_VERSION}&quot;" />
</target>



Expand Down

0 comments on commit 97af8d9

Please sign in to comment.