diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-10-05 21:15:01 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-10-05 21:15:51 +0200 |
commit | a0c950bf88aaf81ea8e5bc079781f9a8ed68ebef (patch) | |
tree | 40933ddbbf8413d4d9c171c3a98c0b3e3384bd25 | |
parent | cf9fb034c436825cee2e90dc8ec3b30b3c93d222 (diff) | |
download | nextcloud-server-a0c950bf88aaf81ea8e5bc079781f9a8ed68ebef.tar.gz nextcloud-server-a0c950bf88aaf81ea8e5bc079781f9a8ed68ebef.zip |
Update license header script to only use code changes
* ignores the first lines of a file with the license header
-rw-r--r-- | build/license.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build/license.php b/build/license.php index 214ea3c2269..26b02bc71c3 100644 --- a/build/license.php +++ b/build/license.php @@ -144,7 +144,9 @@ EOD; } private function getAuthors($file) { - $out = shell_exec("git blame --line-porcelain $file | sed -n 's/^author //p;s/^author-mail //p' | sed 'N;s/\\n/ /' | sort -f | uniq"); + // only add authors that changed code and not the license header + $licenseHeaderEndsAtLine = trim(shell_exec("grep -n '*/' $file | head -n 1 | cut -d ':' -f 1")); + $out = shell_exec("git blame --line-porcelain -L $licenseHeaderEndsAtLine, $file | sed -n 's/^author //p;s/^author-mail //p' | sed 'N;s/\\n/ /' | sort -f | uniq"); $authors = explode(PHP_EOL, $out); $authors = array_filter($authors, function($author) { @@ -173,7 +175,6 @@ if (isset($argv[1])) { '../apps/files_versions', '../apps/provisioning_api', '../apps/user_ldap', - '../apps/user_webdavauth', '../core', '../lib', '../ocs', |