summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-10-26 13:51:22 +0100
committerLukas Reschke <lukas@owncloud.com>2015-10-26 13:51:22 +0100
commitf2a7888c5cdcdbfc49ea33a4f1e0535f2afa2695 (patch)
tree7fcd7c14b83a264c3fd2ffe22583c2419b786457
parent9a7a45bc37ff07dcb3d57f91ab8014fd21c4a40e (diff)
downloadnextcloud-server-f2a7888c5cdcdbfc49ea33a4f1e0535f2afa2695.tar.gz
nextcloud-server-f2a7888c5cdcdbfc49ea33a4f1e0535f2afa2695.zip
Generate AUTHORS file from commits
-rw-r--r--build/license.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/build/license.php b/build/license.php
index 26b02bc71c3..6f8388ee069 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 = <<<EOD
@@ -82,7 +83,24 @@ EOD;
/** @var SplFileInfo $file */
$this->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 <owncloud-bot@tmit.eu>']);
});
$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();
}
-