eclipse-thingweb / playground

Browser or Node.js based tool for validating and playing with W3C Thing Descriptions
https://playground.thingweb.io/
Other
28 stars 22 forks source link

Change copyright to creation date #533

Closed egekorkan closed 8 months ago

egekorkan commented 8 months ago

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.

danielpeintner commented 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

egekorkan commented 8 months ago

@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

danielpeintner commented 8 months ago

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...

danielpeintner commented 8 months ago

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 testfolder.