From 489cc73c997a38aebbe024916e95ef39c1ca901d Mon Sep 17 00:00:00 2001 From: Chris Davenport Date: Sat, 22 Oct 2016 23:08:16 +0100 Subject: [PATCH] Add headers task to Robo (#274) Looks good, thank you @chrisdavenport If we ever have time (probably at the code sprint, added it to the todo-list), we should move the file existing check to the constructor.. We need that for every task :+1: --- RoboFile.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/RoboFile.php b/RoboFile.php index db823e2..64b89dc 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -523,4 +523,19 @@ class RoboFile extends \Robo\Tasks ->run() ->stopOnFail(); } + + /** + * Update copyright headers for this project. (Set the text up in the jorobo.ini) + * + * @return void + */ + public function headers() + { + if (!file_exists('jorobo.ini')) + { + $this->_copy('jorobo.dist.ini', 'jorobo.ini'); + } + + (new \Joomla\Jorobo\Tasks\CopyrightHeader())->run(); + } }