Closed egekorkan closed 8 months ago
Not sure if there is better tooling but for node-wot we used a simple java program that sets the year based on the git history, see https://github.com/eclipse-thingweb/node-wot/blob/master/utils/fix-copyright/CopyrightFix.java
@danielpeintner I have checked that but it seems to be meant for adding the copyright when there is none. Since all files have it in playground, it never goes into the for loop at https://github.com/eclipse-thingweb/node-wot/blob/master/utils/fix-copyright/CopyrightFix.java#L308C27-L308C43
No, this code is just in the end to show that are files that have no copyright and with ADD_MISSING_COPYRIGHT set to true it adds it also..
I can provide a PR if you want...
I created https://github.com/eclipse-thingweb/playground/pull/546.
The reason why it did not work out of the box is that the "original" script limits to ts files only, see https://github.com/eclipse-thingweb/node-wot/blob/f22fe0c87fb7729c0e5936d7ad347b3493a14d75/utils/fix-copyright/CopyrightFix.java#L19
and we just look into src
and test
folder.
As documented at https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/3992#note_1432755, we should change the copyright years to the creation years and not the latest year.