-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Migrate to SPDX headers #12204
Conversation
Don't we need to set up a workflow for checking compliance? Or something for later? |
We have a GH action in the template repo but it will fail until you reach full compliance. So better get there first and than add the action, else you have a failing action on any PR until then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some very minor comments, 👍
81b6672
to
426c485
Compare
db617dc
to
8484ec8
Compare
e383474
to
d77af85
Compare
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
d77af85
to
4d3b4e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's around 60 files without a creation year in copyright header. But given amount of changes, I guess, we are good for now, that's something could be added for later, if CI is green now
UPD: here are missing years: 24ad3a6 directory="."
substring="SPDX-FileCopyrightText: Nextcloud"
# Find files recursively in the directory
find "$directory" -type f -exec grep -l "$substring" {} + | while IFS= read -r file
do
# Get the creation year of the file
creation_year=$(git log --diff-filter=A --follow --format=%aI "$file" | tail -n 1 | cut -d'-' -f1)
echo "$creation_year"
# Insert the creation year at the specified place in the file
sed -i "s~$substring~SPDX-FileCopyrightText: $creation_year Nextcloud~g" "$file"
done |
Feel free to commit |
Signed-off-by: Maksim Sukharev <[email protected]>
Signed-off-by: Maksim Sukharev <[email protected]>
No description provided.