summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorDenton Gentry <dgentry@tailscale.com>2023-01-01 15:53:03 -0800
committerDenton Gentry <dgentry@tailscale.com>2023-01-01 16:36:10 -0800
commit239b7cce74ed066dc362843d39bbaf3353f5027d (patch)
tree4dd63c37b46079454f09b08cc92c0d091b1b471a /scripts
parent692eac23adf62f979dddb5b9694d084142036f10 (diff)
downloadtailscale-cloner.tar.xz
tailscale-cloner.zip
util/codegen: Remove year from copyright header.cloner
Copyright notices in software are not supposed to update the year in the header. Because we have a CI check for `go generate`, we're failing CI until we go update all of the copyright headers in generated files to say 2023. Instead, relax the requirement to always have a year in the copyright header. Fixes https://github.com/tailscale/tailscale/issues/6865 Signed-off-by: Denton Gentry <dgentry@tailscale.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check_license_headers.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/check_license_headers.sh b/scripts/check_license_headers.sh
index 84e561ce5..7ee6284cd 100755
--- a/scripts/check_license_headers.sh
+++ b/scripts/check_license_headers.sh
@@ -10,7 +10,7 @@
check_file() {
got=$1
- for year in `seq 2019 2022`; do
+ for year in `seq 2019 2023`; do
want=$(cat <<EOF
// Copyright (c) $year Tailscale Inc & AUTHORS All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -21,6 +21,19 @@ EOF
return 0
fi
done
+
+ # For the benefit of generated files, we also allow no year in
+ # the header. https://github.com/tailscale/tailscale/issues/6865
+ want=$(cat <<EOF
+// Copyright (c) Tailscale Inc & AUTHORS All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+EOF
+ )
+ if [ "$got" = "$want" ]; then
+ return 0
+ fi
+
return 1
}