diff --git a/.travis.yml b/.travis.yml index 6d89ad4..df754ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,11 @@ language: php +sudo: false + +cache: + directories: + - $HOME/.composer/cache + php: - 5.4 - 5.5 @@ -26,18 +32,10 @@ before_install: - composer self-update install: - - wget http://taskwarrior.org/download/task-$TASKWARRIOR.tar.gz - - gunzip task-$TASKWARRIOR.tar.gz - - tar xf task-$TASKWARRIOR.tar - - cd task-$TASKWARRIOR - - sudo apt-get install cmake build-essential uuid-dev libgnutls-dev libreadline6-dev --force-yes - - sudo cmake -DCMAKE_BUILD_TYPE=release . - - sudo make - - sudo make install - - sudo ln -s /usr/local/bin/task /usr/bin/task - - task --version - - cd .. + - ln -s build/taskwarrior-$TASKWARRIOR task + - chmod +x ./task + - ./task --version before_script: - - composer update --prefer-source $PREFER_LOWEST + - composer update $PREFER_LOWEST diff --git a/build/build.sh b/build/build.sh new file mode 100755 index 0000000..1826792 --- /dev/null +++ b/build/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +TASKWARRIOR=$1 + +wget http://taskwarrior.org/download/task-$TASKWARRIOR.tar.gz +gunzip task-$TASKWARRIOR.tar.gz +tar xf task-$TASKWARRIOR.tar +cd task-$TASKWARRIOR +sudo apt-get install cmake build-essential uuid-dev libgnutls-dev libreadline6-dev --force-yes +sudo cmake -DCMAKE_BUILD_TYPE=release . +sudo make +cd .. +cp task-$TASKWARRIOR/src/task ./taskwarrior-$TASKWARRIOR +sudo rm -Rf task-$TASKWARRIOR* diff --git a/build/taskwarrior-2.4.3 b/build/taskwarrior-2.4.3 new file mode 100755 index 0000000..d06cb93 Binary files /dev/null and b/build/taskwarrior-2.4.3 differ diff --git a/build/taskwarrior-2.4.4 b/build/taskwarrior-2.4.4 new file mode 100755 index 0000000..f513f44 Binary files /dev/null and b/build/taskwarrior-2.4.4 differ diff --git a/tests/TaskManagerTest.php b/tests/TaskManagerTest.php index 8792056..4ecdf09 100644 --- a/tests/TaskManagerTest.php +++ b/tests/TaskManagerTest.php @@ -37,7 +37,13 @@ class TaskManagerTest extends \PHPUnit_Framework_TestCase $fs->remove($this->taskDir . '/.taskrc'); $fs->remove($this->taskDir . '/.task'); - $this->taskwarrior = new Taskwarrior($this->taskDir . '/.taskrc', $this->taskDir . '/.task'); + $bin = 'task'; + + if (file_exists(__DIR__ . '/../task')) { + $bin = realpath(__DIR__ . '/../task'); + } + + $this->taskwarrior = new Taskwarrior($this->taskDir . '/.taskrc', $this->taskDir . '/.task', [], $bin); $this->taskManager = new TaskManager($this->taskwarrior); $this->taskwarrior->version(); // to initialise } diff --git a/tests/TaskwarriorTest.php b/tests/TaskwarriorTest.php index 2556d95..482f22f 100644 --- a/tests/TaskwarriorTest.php +++ b/tests/TaskwarriorTest.php @@ -18,7 +18,14 @@ class TaskwarriorTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->tearDown(); - $this->taskwarrior = new Taskwarrior(__DIR__ . '/.taskrc', __DIR__ . '/.task'); + + $bin = 'task'; + + if (file_exists(__DIR__ . '/../task')) { + $bin = realpath(__DIR__ . '/../task'); + } + + $this->taskwarrior = new Taskwarrior(__DIR__ . '/.taskrc', __DIR__ . '/.task', [], $bin); $this->taskwarrior->version(); // to initialise }