Skip to content

Commit 19ec523

Browse files
ShGKmeAndyScherzinger
authored andcommitted
chore: update HowToApplyALicense.md
Signed-off-by: Grigorii Shartsev <me@shgk.me> Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
1 parent 18434d1 commit 19ec523

File tree

1 file changed

+81
-6
lines changed

1 file changed

+81
-6
lines changed

contribute/HowToApplyALicense.md

Lines changed: 81 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,60 @@ Additionally Nextcloud doesn't require a CLA (Contributor License
99
Agreement). The copyright belongs to all the individual
1010
contributors.
1111

12-
If you modify an existing file, please keep the existing license header as
13-
it is and just add your copyright notice:
12+
## Apply a license to a new file
1413

15-
````
16-
@copyright Copyright (c) <year>, <your name> (<your email address>)
17-
````
14+
If you create a new file please use a license header
1815

19-
If you create a new file please use this license header:
16+
#### Frontend source (`.js`, `.ts`, `.css` and etc)
2017

18+
```js
19+
/**
20+
* @copyright Copyright (c) <year>, <your name> (<your email address>)
21+
*
22+
* @license AGPL-3.0-or-later
23+
*
24+
* This program is free software: you can redistribute it and/or modify
25+
* it under the terms of the GNU Affero General Public License as
26+
* published by the Free Software Foundation, either version 3 of the
27+
* License, or (at your option) any later version.
28+
*
29+
* This program is distributed in the hope that it will be useful,
30+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
31+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32+
* GNU Affero General Public License for more details.
33+
*
34+
* You should have received a copy of the GNU Affero General Public License
35+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
36+
*
37+
*/
2138
````
39+
40+
or `.vue` files
41+
42+
```html
43+
<!--
44+
- @copyright Copyright (c) <year>, <your name> (<your email address>)
45+
-
46+
- @license AGPL-3.0-or-later
47+
-
48+
- This program is free software: you can redistribute it and/or modify
49+
- it under the terms of the GNU Affero General Public License as
50+
- published by the Free Software Foundation, either version 3 of the
51+
- License, or (at your option) any later version.
52+
-
53+
- This program is distributed in the hope that it will be useful,
54+
- but WITHOUT ANY WARRANTY; without even the implied warranty of
55+
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56+
- GNU Affero General Public License for more details.
57+
-
58+
- You should have received a copy of the GNU Affero General Public License
59+
- along with this program. If not, see <http://www.gnu.org/licenses/>.
60+
-->
61+
```
62+
63+
#### Backend source (`.php`)
64+
65+
```php
2266
/**
2367
* @copyright Copyright (c) <year>, <your name> (<your email address>)
2468
*
@@ -38,8 +82,39 @@ If you create a new file please use this license header:
3882
* along with this program. If not, see <http://www.gnu.org/licenses/>.
3983
*
4084
*/
85+
```
86+
87+
## Apply a licence to an existing file
88+
89+
If you modify an existing file, please keep the existing license header as
90+
it is and just add your copyright notice, for example:
91+
92+
````diff
93+
/**
94+
* @copyright Copyright (c) 2022, Alice (alice@nextcloud.local)
95+
* @copyright Copyright (c) 2023, Bob (bob@nextcloud.local)
96+
+* @copyright Copyright (c) <year>, <your name> (<your email address>)
97+
*
98+
* @license GNU AGPL version 3 or any later version
99+
*
100+
* This program is free software: you can redistribute it and/or modify
101+
* it under the terms of the GNU Affero General Public License as
102+
* published by the Free Software Foundation, either version 3 of the
103+
* License, or (at your option) any later version.
104+
*
105+
* This program is distributed in the hope that it will be useful,
106+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
107+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
108+
* GNU Affero General Public License for more details.
109+
*
110+
* You should have received a copy of the GNU Affero General Public License
111+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
112+
*
113+
*/
41114
````
42115

116+
## DCO
117+
43118
Additionally we require a Developer Certificate of Origin (DCO), look
44119
at [CONTRIBUTING.md][contributing] to learn more how to sign your commits.
45120

0 commit comments

Comments
 (0)