diff --git a/build/license.php b/build/license.php index 26b02bc71c..6f8388ee06 100644 --- a/build/license.php +++ b/build/license.php @@ -21,6 +21,7 @@ class Licenses { protected $paths = array(); + public $authors = []; public function __construct() { $this->licenseText = <<handleFile($file); } + } + function writeAuthorsFile() { + ksort($this->authors); + $template = "ownCloud is written by: +@AUTHORS@ + +With help from many libraries and frameworks including: + Open Collaboration Services + SabreDAV + jQuery + … +"; + $authors = implode(PHP_EOL, array_map(function($author){ + return " - ".$author; + }, $this->authors)); + $template = str_replace('@AUTHORS@', $authors, $template); + file_put_contents(__DIR__.'/../AUTHORS', $template); } function handleFile($path) { @@ -156,6 +174,7 @@ EOD; 'Jenkins for ownCloud ']); }); $authors = array_map(function($author){ + $this->authors[$author] = $author; return " * @author $author"; }, $authors); return implode(PHP_EOL, $authors); @@ -187,5 +206,5 @@ if (isset($argv[1])) { '../status.php', '../version.php', ]); + $licenses->writeAuthorsFile(); } -