Skip to content

Commit 553ea60

Browse files
committed
project.xml / zproject.gsl : by default do not pause if Copyright is not up to date (review from #1205)
1 parent cfe1637 commit 553ea60

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

project.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
repository := git repository holding project (optional)
5151
unique_class_name := "0"|"1" (optional, defaults to 0) As a failsafe, forbid naming agents or classes same as the project itself (can cause conflicts in generated header filenames). Disable explicitly (set to 0) only in legacy projects that can not regenerate otherwise, and try to fix those.
5252
license := optional common tag of the project's license ("MPLv2", "GPL-2.0+", "CompanyName Proprietary" etc.); see also license.xml for longer wording
53+
check_license_years := "0"|"1" (optional, defaults to 0) When a project is regenerated, and if any license text(s) are defined, we check that at least one Copyright line in at least one license text contains the current year, and warn if not. If this option is set to "1", we also pause so that interactive developers can see this warning better and intervene.
5354
-->
5455
<project script = "zproject.gsl" name = "zproject"
5556

zproject.gsl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,16 @@ function check_license_years (xml)
7070
if (0 = my.year_seen)
7171
echo "W: Current year '$(my.now_year)' is not listed in any license tag / Copyright line!"
7272
echo "W: Do you want to Ctrl+Break now, edit your license.xml and regenerate the project?"
73-
echo "W: (Sleeping 5 sec...)"
74-
thread.sleep (500)
75-
echo "W: Oh well, moving on with possibly obsoleted copyrights"
73+
# Per PR review, there's no hard need for a pause - after the
74+
# Bern convention the "copyright YYYY-YYYY" line is actually not
75+
# legally required almost anywhere in the world, and is purely
76+
# informative. Copyright is implicit and automatic, and with
77+
# git there is enough metadata to satisfty any lawyer/court.
78+
if (my.xml.check_license_years ?= 1)
79+
echo "W: (Sleeping 5 sec...)"
80+
thread.sleep (500)
81+
echo "W: Oh well, moving on with possibly obsoleted copyrights"
82+
endif
7683
endif
7784
endif
7885
endfunction

0 commit comments

Comments
 (0)