Bump copyrights
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
4c0bb4b971
commit
50d9e83ed1
48
.github/workflows/lint.yml
vendored
48
.github/workflows/lint.yml
vendored
|
@ -28,6 +28,30 @@ jobs:
|
|||
- name: Lint
|
||||
run: composer run lint
|
||||
|
||||
php-cs-fixer:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['7.4']
|
||||
|
||||
name: cs php${{ matrix.php-versions }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@master
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
coverage: none
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer i
|
||||
|
||||
- name: Run coding standards check
|
||||
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
|
||||
|
||||
node:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
@ -35,7 +59,7 @@ jobs:
|
|||
matrix:
|
||||
node-versions: [12.x]
|
||||
|
||||
name: node${{ matrix.node-versions }}
|
||||
name: eslint node${{ matrix.node-versions }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
@ -49,3 +73,25 @@ jobs:
|
|||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
stylelint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-versions: [12.x]
|
||||
|
||||
name: stylelint node${{ matrix.node-versions }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up node ${{ matrix.node-versions }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-versions: ${{ matrix.node-versions }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: npm run stylelint
|
||||
|
|
|
@ -8,17 +8,19 @@
|
|||
<version>2.0.0-beta1</version>
|
||||
<licence>agpl</licence>
|
||||
|
||||
<author>Vinzenz Rosenkranz</author>
|
||||
<author>René Gieling</author>
|
||||
<author>Kai Schröer</author>
|
||||
<author>Natalie Gilbert</author>
|
||||
<author>Nick Gallo</author>
|
||||
<author>Inigo Jiron</author>
|
||||
<author>Affan Hussain</author>
|
||||
<author>Ajfar Huq</author>
|
||||
<author>Tim Sattizahn</author>
|
||||
<author>Stephan Link</author>
|
||||
<author>Inigo Jiron</author>
|
||||
<author>John Molakvoæ</author>
|
||||
<author>Jonas Rittershofer</author>
|
||||
<author>Kai Schröer</author>
|
||||
<author>Kameron Sheppard</author>
|
||||
<author>Natalie Gilbert</author>
|
||||
<author>Nick Gallo</author>
|
||||
<author>René Gieling</author>
|
||||
<author>Stephan Link</author>
|
||||
<author>Tim Sattizahn</author>
|
||||
<author>Vinzenz Rosenkranz</author>
|
||||
|
||||
<category>tools</category>
|
||||
<category>social</category>
|
||||
|
|
|
@ -2,22 +2,25 @@
|
|||
/**
|
||||
* @copyright Copyright (c] 2017 Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
|
||||
*
|
||||
* @author Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option] any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,22 +2,18 @@
|
|||
"name": "nextcloud/forms",
|
||||
"type": "project",
|
||||
"license": "AGPLv3",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Vinzenz Rosenkranz"
|
||||
},
|
||||
{
|
||||
"name": "Kai Schröer"
|
||||
},
|
||||
{
|
||||
"name": "René Gieling"
|
||||
}
|
||||
],
|
||||
"require-dev": {
|
||||
"christophwurst/nextcloud": "^16.0",
|
||||
"phpunit/phpunit": "^8"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
|
||||
}
|
||||
"christophwurst/nextcloud": "^17.0",
|
||||
"phpunit/phpunit": "^8",
|
||||
"nextcloud/coding-standard": "^0.3.0"
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"classmap-authoritative": true
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;",
|
||||
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
||||
"cs:fix": "php-cs-fixer fix"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +1,27 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2017 Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
|
||||
*
|
||||
* @author Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,29 +1,26 @@
|
|||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2017 Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
|
||||
*
|
||||
* @author René Gieling <github@dartcafe.de>
|
||||
* @author Natalie Gilbert <ngilb634@umd.edu>
|
||||
* @author Inigo Jiron
|
||||
* @author Affan Hussain
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,28 +2,26 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2017 Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
|
||||
*
|
||||
* @author Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
|
||||
* @author René Gieling <github@dartcafe.de>
|
||||
* @author Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
* @author Natalie Gilbert
|
||||
* @author Affan Hussain
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
* @author Marcel Klehr <mklehr@gmx.net>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,22 +2,23 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2017 Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
|
||||
*
|
||||
* @author René Gieling <github@dartcafe.de>
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,25 +1,28 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2020 Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
*
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,22 +2,24 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2020 Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
*
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
*
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,26 +1,27 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2017 Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
|
||||
*
|
||||
* @author Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
|
||||
* @author Kai Schröer <git@schroeer.co>
|
||||
* @author René Gieling <github@dartcafe.de>
|
||||
*
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,23 +2,24 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2017 Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
|
||||
*
|
||||
* @author Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
|
||||
* @author René Gieling <github@dartcafe.de>
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,25 +1,26 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2019 Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
*
|
||||
* @author Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2019 Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
*
|
||||
* @author Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
* @author Natalie Gilbert <ngilb634@umd.edu>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,24 +1,29 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2019 Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
*
|
||||
* @author Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,23 +2,25 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2019 Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
*
|
||||
* @author Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
* @author Natalie Gilbert <ngilb634@umd.edu>
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,25 +1,28 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2020 Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
*
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,22 +2,24 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2020 Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
*
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -6,18 +6,18 @@
|
|||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,6 +2,29 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
namespace OCA\Forms\Migration;
|
||||
|
||||
use Closure;
|
||||
|
|
|
@ -2,22 +2,23 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2020 Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
*
|
||||
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
||||
* @author Jonas Rittershofer <jotoeri@users.noreply.github.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,21 +2,22 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This code is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License, version 3,
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
390
license.php
Normal file
390
license.php
Normal file
|
@ -0,0 +1,390 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @author Thomas Müller
|
||||
*
|
||||
* @copyright Copyright (c) 2015, ownCloud, Inc.
|
||||
* @license AGPL-3.0
|
||||
*
|
||||
* This code is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License, version 3,
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
class Licenses {
|
||||
protected $paths = [];
|
||||
protected $mailMap = [];
|
||||
protected $checkFiles = [];
|
||||
public $authors = [];
|
||||
|
||||
public function __construct() {
|
||||
$this->licenseText = <<<EOD
|
||||
/**
|
||||
@COPYRIGHT@
|
||||
*
|
||||
@AUTHORS@
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
EOD;
|
||||
$this->licenseTextLegacy = <<<EOD
|
||||
/**
|
||||
@COPYRIGHT@
|
||||
*
|
||||
@AUTHORS@
|
||||
*
|
||||
* @license AGPL-3.0
|
||||
*
|
||||
* This code is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License, version 3,
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
EOD;
|
||||
$this->licenseTextLegacy = str_replace('@YEAR@', date("Y"), $this->licenseTextLegacy);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|string[] $folder
|
||||
* @param string|bool $gitRoot
|
||||
*/
|
||||
public function exec($folder, $gitRoot = false) {
|
||||
if (is_array($folder)) {
|
||||
foreach ($folder as $f) {
|
||||
$this->exec($f, $gitRoot);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ($gitRoot !== false && substr($gitRoot, -1) !== '/') {
|
||||
$gitRoot .= '/';
|
||||
}
|
||||
|
||||
if (is_file($folder)) {
|
||||
$this->handleFile($folder, $gitRoot);
|
||||
$this->printFilesToCheck();
|
||||
return;
|
||||
}
|
||||
|
||||
$excludes = array_map(function ($item) use ($folder) {
|
||||
return $folder . '/' . $item;
|
||||
}, ['vendor', '3rdparty', '.git', 'l10n', 'templates', 'composer']);
|
||||
|
||||
$iterator = new RecursiveDirectoryIterator($folder, RecursiveDirectoryIterator::SKIP_DOTS);
|
||||
$iterator = new RecursiveCallbackFilterIterator($iterator, function ($item) use ($folder, $excludes) {
|
||||
/** @var SplFileInfo $item */
|
||||
foreach ($excludes as $exclude) {
|
||||
if (substr($item->getPath(), 0, strlen($exclude)) === $exclude) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
$iterator = new RecursiveIteratorIterator($iterator);
|
||||
$iterator = new RegexIterator($iterator, '/^.+\.php$/i');
|
||||
|
||||
foreach ($iterator as $file) {
|
||||
/** @var SplFileInfo $file */
|
||||
$this->handleFile($file, $gitRoot);
|
||||
}
|
||||
|
||||
$this->printFilesToCheck();
|
||||
}
|
||||
|
||||
public function writeAuthorsFile() {
|
||||
ksort($this->authors);
|
||||
$template = "Nextcloud 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);
|
||||
}
|
||||
|
||||
public function handleFile($path, $gitRoot) {
|
||||
$source = file_get_contents($path);
|
||||
if ($this->isMITLicensed($source)) {
|
||||
echo "MIT licensed file: $path" . PHP_EOL;
|
||||
return;
|
||||
}
|
||||
$copyrightNotices = $this->getCopyrightNotices($path, $source);
|
||||
$authors = $this->getAuthors($path, $gitRoot);
|
||||
if ($this->isOwnCloudLicensed($source)) {
|
||||
$license = str_replace('@AUTHORS@', $authors, $this->licenseTextLegacy);
|
||||
$this->checkCopyrightState($path, $gitRoot);
|
||||
} else {
|
||||
$license = str_replace('@AUTHORS@', $authors, $this->licenseText);
|
||||
}
|
||||
|
||||
if ($copyrightNotices === '') {
|
||||
$license = str_replace('@COPYRIGHT@', ' *', $license);
|
||||
} else {
|
||||
$license = str_replace('@COPYRIGHT@', $copyrightNotices, $license);
|
||||
}
|
||||
|
||||
[$source, $isStrict] = $this->eatOldLicense($source);
|
||||
if ($isStrict) {
|
||||
$source = "<?php" . PHP_EOL . PHP_EOL . 'declare(strict_types=1);' . PHP_EOL . PHP_EOL . $license . PHP_EOL . $source;
|
||||
} else {
|
||||
$source = "<?php" . PHP_EOL . $license . PHP_EOL . $source;
|
||||
}
|
||||
file_put_contents($path,$source);
|
||||
echo "License updated: $path" . PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $source
|
||||
* @return bool
|
||||
*/
|
||||
private function isMITLicensed($source) {
|
||||
$lines = explode(PHP_EOL, $source);
|
||||
while (!empty($lines)) {
|
||||
$line = $lines[0];
|
||||
array_shift($lines);
|
||||
if (strpos($line, 'The MIT License') !== false) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function isOwnCloudLicensed($source) {
|
||||
$lines = explode(PHP_EOL, $source);
|
||||
while (!empty($lines)) {
|
||||
$line = $lines[0];
|
||||
array_shift($lines);
|
||||
if (strpos($line, 'ownCloud, Inc') !== false || strpos($line, 'ownCloud GmbH') !== false) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $source
|
||||
* @return string
|
||||
*/
|
||||
private function eatOldLicense($source) {
|
||||
$lines = explode(PHP_EOL, $source);
|
||||
$isStrict = false;
|
||||
while (!empty($lines)) {
|
||||
$line = $lines[0];
|
||||
if (trim($line) === '<?php') {
|
||||
array_shift($lines);
|
||||
continue;
|
||||
}
|
||||
if (strpos($line, '<?php declare(strict_types') !== false) {
|
||||
$isStrict = true;
|
||||
array_shift($lines);
|
||||
continue;
|
||||
}
|
||||
if (strpos($line, 'declare (strict_types') !== false) {
|
||||
$isStrict = true;
|
||||
array_shift($lines);
|
||||
continue;
|
||||
}
|
||||
if (strpos($line, 'declare(strict_types') !== false) {
|
||||
$isStrict = true;
|
||||
array_shift($lines);
|
||||
continue;
|
||||
}
|
||||
if (strpos($line, '/**') !== false) {
|
||||
array_shift($lines);
|
||||
continue;
|
||||
}
|
||||
if (strpos($line, '*/') !== false) {
|
||||
array_shift($lines);
|
||||
break;
|
||||
}
|
||||
if (strpos($line, '*') !== false) {
|
||||
array_shift($lines);
|
||||
continue;
|
||||
}
|
||||
if (trim($line) === '') {
|
||||
array_shift($lines);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return [implode(PHP_EOL, $lines), $isStrict];
|
||||
}
|
||||
|
||||
private function getCopyrightNotices($path, $file) {
|
||||
$licenseHeaderEndsAtLine = (int)trim(shell_exec("grep -n '*/' $path | head -n 1 | cut -d ':' -f 1"));
|
||||
$lineByLine = explode(PHP_EOL, $file, $licenseHeaderEndsAtLine + 1);
|
||||
$copyrightNotice = [];
|
||||
$licensePart = array_slice($lineByLine, 0, $licenseHeaderEndsAtLine);
|
||||
foreach ($licensePart as $line) {
|
||||
if (strpos($line, '@copyright') !== false) {
|
||||
$copyrightNotice[] = $line;
|
||||
}
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $copyrightNotice);
|
||||
}
|
||||
|
||||
/**
|
||||
* check if all lines where changed after the Nextcloud fork.
|
||||
* That's not a guarantee that we can switch to AGPLv3 or later,
|
||||
* but a good indicator that we should have a look at the file
|
||||
*
|
||||
* @param $path
|
||||
* @param $gitRoot
|
||||
*/
|
||||
private function checkCopyrightState($path, $gitRoot) {
|
||||
// This was the date the Nextcloud fork was created
|
||||
$deadline = new DateTime('06/06/2016');
|
||||
$deadlineTimestamp = $deadline->getTimestamp();
|
||||
|
||||
$buildDir = getcwd();
|
||||
if ($gitRoot) {
|
||||
chdir($gitRoot);
|
||||
$path = substr($path, strlen($gitRoot));
|
||||
}
|
||||
$out = shell_exec("git --no-pager blame --line-porcelain $path | sed -n 's/^author-time //p'");
|
||||
if ($gitRoot) {
|
||||
chdir($buildDir);
|
||||
}
|
||||
$timestampChanges = explode(PHP_EOL, $out);
|
||||
$timestampChanges = array_slice($timestampChanges, 0, count($timestampChanges)-1);
|
||||
foreach ($timestampChanges as $timestamp) {
|
||||
if ((int)$timestamp < $deadlineTimestamp) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//all changes after the deadline
|
||||
$this->checkFiles[] = $path;
|
||||
}
|
||||
|
||||
private function printFilesToCheck() {
|
||||
if (!empty($this->checkFiles)) {
|
||||
print "\n";
|
||||
print "For following files all lines changed since the Nextcloud fork." . PHP_EOL;
|
||||
print "Please check if these files can be moved over to AGPLv3 or later" . PHP_EOL;
|
||||
print "\n";
|
||||
foreach ($this->checkFiles as $file) {
|
||||
print $file . PHP_EOL;
|
||||
}
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
|
||||
private function getAuthors($file, $gitRoot) {
|
||||
// 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"));
|
||||
$buildDir = getcwd();
|
||||
if ($gitRoot) {
|
||||
chdir($gitRoot);
|
||||
$file = substr($file, strlen($gitRoot));
|
||||
}
|
||||
$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");
|
||||
if ($gitRoot) {
|
||||
chdir($buildDir);
|
||||
}
|
||||
$authors = explode(PHP_EOL, $out);
|
||||
|
||||
$authors = array_filter($authors, function ($author) {
|
||||
return !in_array($author, [
|
||||
'',
|
||||
'Not Committed Yet <not.committed.yet>',
|
||||
'Jenkins for ownCloud <owncloud-bot@tmit.eu>',
|
||||
'Scrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>',
|
||||
]);
|
||||
});
|
||||
|
||||
if ($gitRoot) {
|
||||
$authors = array_map([$this, 'checkCoreMailMap'], $authors);
|
||||
$authors = array_unique($authors);
|
||||
}
|
||||
|
||||
$authors = array_map(function ($author) {
|
||||
$author = $this->fixInvalidEmail($author);
|
||||
$this->authors[$author] = $author;
|
||||
return " * @author $author";
|
||||
}, $authors);
|
||||
|
||||
return implode(PHP_EOL, $authors);
|
||||
}
|
||||
|
||||
private function checkCoreMailMap($author) {
|
||||
if (empty($this->mailMap)) {
|
||||
$content = file_get_contents(__DIR__ . '/../.mailmap');
|
||||
$entries = explode("\n", $content);
|
||||
foreach ($entries as $entry) {
|
||||
if (strpos($entry, '> ') === false) {
|
||||
$this->mailMap[$entry] = $entry;
|
||||
} else {
|
||||
list($use, $actual) = explode('> ', $entry);
|
||||
$this->mailMap[$actual] = $use . '>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($this->mailMap[$author])) {
|
||||
return $this->mailMap[$author];
|
||||
}
|
||||
return $author;
|
||||
}
|
||||
|
||||
private function fixInvalidEmail($author) {
|
||||
preg_match('/<(.*)>/', $author, $mailMatch);
|
||||
if (count($mailMatch) === 2 && !filter_var($mailMatch[1], FILTER_VALIDATE_EMAIL)) {
|
||||
$author = str_replace('<'.$mailMatch[1].'>', '"'.$mailMatch[1].'"', $author);
|
||||
}
|
||||
return $author;
|
||||
}
|
||||
}
|
||||
|
||||
$licenses = new Licenses;
|
||||
if (isset($argv[1])) {
|
||||
$licenses->exec($argv[1], isset($argv[2]) ? $argv[1] : false);
|
||||
} else {
|
||||
$licenses->exec([
|
||||
'./appinfo',
|
||||
'./lib',
|
||||
'./templates'
|
||||
]);
|
||||
$licenses->writeAuthorsFile();
|
||||
}
|
44
package.json
44
package.json
|
@ -2,50 +2,6 @@
|
|||
"name": "forms",
|
||||
"description": "Forms app for nextcloud",
|
||||
"version": "2.0.0-beta1",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Vinzenz Rosenkranz",
|
||||
"email": "vinzenz.rosenkranz@gmail.com",
|
||||
"role": "Polls App Developer"
|
||||
},
|
||||
{
|
||||
"name": "Rene Gieling",
|
||||
"email": "github@dartcafe.de",
|
||||
"role": "Polls App Developer"
|
||||
},
|
||||
{
|
||||
"name": "Natalie Gilbert",
|
||||
"role": "Forms Team Lead/Back End Developer"
|
||||
},
|
||||
{
|
||||
"name": "Inigo Jiron",
|
||||
"role": "Back End Developer/Database Specialist"
|
||||
},
|
||||
{
|
||||
"name": "Affan Hussain",
|
||||
"role": "Forms Technical Lead"
|
||||
},
|
||||
{
|
||||
"name": "Nick Gallo",
|
||||
"role": "Front End Developer"
|
||||
},
|
||||
{
|
||||
"name": "Ajfar Huq",
|
||||
"role": "Front End Developer"
|
||||
},
|
||||
{
|
||||
"name": "Tim Sattizahn",
|
||||
"role": "Forms QA Lead"
|
||||
},
|
||||
{
|
||||
"name": "Stephan Link",
|
||||
"role": "Quality Assurance"
|
||||
},
|
||||
{
|
||||
"name": "Kameron Sheppard",
|
||||
"role": "Quality Assurance"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/nextcloud/forms.git"
|
||||
|
|
|
@ -1,25 +1,23 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2019 Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
*
|
||||
* @author Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
|
|
|
@ -1,25 +1,23 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2019 Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
*
|
||||
* @author Inigo Jiron <ijiron@terpmail.umd.edu>
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2017 Kai Schröer <git@schroeer.co>
|
||||
*
|
||||
* @author Kai Schröer <git@schroeer.co>
|
||||
* @author affan98 <affan98@gmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue