diff options
| -rw-r--r-- | cmd/viewer/tests/tests_clone.go | 2 | ||||
| -rw-r--r-- | cmd/viewer/tests/tests_view.go | 2 | ||||
| -rw-r--r-- | ipn/ipn_clone.go | 2 | ||||
| -rw-r--r-- | ipn/ipn_view.go | 2 | ||||
| -rw-r--r-- | ipn/ipnstate/ipnstate_clone.go | 2 | ||||
| -rwxr-xr-x | scripts/check_license_headers.sh | 15 | ||||
| -rw-r--r-- | tailcfg/tailcfg_clone.go | 2 | ||||
| -rw-r--r-- | tailcfg/tailcfg_view.go | 2 | ||||
| -rw-r--r-- | types/dnstype/dnstype_clone.go | 2 | ||||
| -rw-r--r-- | types/dnstype/dnstype_view.go | 2 | ||||
| -rw-r--r-- | types/persist/persist_clone.go | 2 | ||||
| -rw-r--r-- | types/persist/persist_view.go | 2 | ||||
| -rw-r--r-- | util/codegen/codegen.go | 5 | ||||
| -rw-r--r-- | wgengine/filter/filter_clone.go | 2 | ||||
| -rw-r--r-- | wgengine/wgcfg/wgcfg_clone.go | 2 |
15 files changed, 29 insertions, 17 deletions
diff --git a/cmd/viewer/tests/tests_clone.go b/cmd/viewer/tests/tests_clone.go index 8cad5f3f3..8218cbdaa 100644 --- a/cmd/viewer/tests/tests_clone.go +++ b/cmd/viewer/tests/tests_clone.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. diff --git a/cmd/viewer/tests/tests_view.go b/cmd/viewer/tests/tests_view.go index a01853553..cdb7e20c5 100644 --- a/cmd/viewer/tests/tests_view.go +++ b/cmd/viewer/tests/tests_view.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. diff --git a/ipn/ipn_clone.go b/ipn/ipn_clone.go index 8f9bc0567..77abe86d1 100644 --- a/ipn/ipn_clone.go +++ b/ipn/ipn_clone.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. diff --git a/ipn/ipn_view.go b/ipn/ipn_view.go index 2209cb0a1..04317b327 100644 --- a/ipn/ipn_view.go +++ b/ipn/ipn_view.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. diff --git a/ipn/ipnstate/ipnstate_clone.go b/ipn/ipnstate/ipnstate_clone.go index 52d8d6c7e..baad64af1 100644 --- a/ipn/ipnstate/ipnstate_clone.go +++ b/ipn/ipnstate/ipnstate_clone.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. 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 } diff --git a/tailcfg/tailcfg_clone.go b/tailcfg/tailcfg_clone.go index 098f42489..3eff1be47 100644 --- a/tailcfg/tailcfg_clone.go +++ b/tailcfg/tailcfg_clone.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. diff --git a/tailcfg/tailcfg_view.go b/tailcfg/tailcfg_view.go index eb8d3bb02..274635e2e 100644 --- a/tailcfg/tailcfg_view.go +++ b/tailcfg/tailcfg_view.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. diff --git a/types/dnstype/dnstype_clone.go b/types/dnstype/dnstype_clone.go index 1ea760c4a..f0e694b10 100644 --- a/types/dnstype/dnstype_clone.go +++ b/types/dnstype/dnstype_clone.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. diff --git a/types/dnstype/dnstype_view.go b/types/dnstype/dnstype_view.go index 7f99be2f4..2a053643e 100644 --- a/types/dnstype/dnstype_view.go +++ b/types/dnstype/dnstype_view.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. diff --git a/types/persist/persist_clone.go b/types/persist/persist_clone.go index 82db9c52b..977fd21b4 100644 --- a/types/persist/persist_clone.go +++ b/types/persist/persist_clone.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. diff --git a/types/persist/persist_view.go b/types/persist/persist_view.go index 15355abf4..ca11ac51b 100644 --- a/types/persist/persist_view.go +++ b/types/persist/persist_view.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. diff --git a/util/codegen/codegen.go b/util/codegen/codegen.go index 61ec85de8..7fc575fd4 100644 --- a/util/codegen/codegen.go +++ b/util/codegen/codegen.go @@ -15,7 +15,6 @@ import ( "os" "reflect" "strings" - "time" "golang.org/x/tools/go/packages" "golang.org/x/tools/imports" @@ -54,7 +53,7 @@ func HasNoClone(structTag string) bool { return false } -const header = `// Copyright (c) %d Tailscale Inc & AUTHORS All rights reserved. +const header = `// 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. @@ -105,7 +104,7 @@ func (it *ImportTracker) Write(w io.Writer) { } func writeHeader(w io.Writer, tool, pkg string) { - fmt.Fprintf(w, header, time.Now().Year(), tool, pkg) + fmt.Fprintf(w, header, tool, pkg) } // WritePackageFile adds a file with the provided imports and contents to package. diff --git a/wgengine/filter/filter_clone.go b/wgengine/filter/filter_clone.go index bbae3c451..272dbef36 100644 --- a/wgengine/filter/filter_clone.go +++ b/wgengine/filter/filter_clone.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. diff --git a/wgengine/wgcfg/wgcfg_clone.go b/wgengine/wgcfg/wgcfg_clone.go index ed040cde4..b61697525 100644 --- a/wgengine/wgcfg/wgcfg_clone.go +++ b/wgengine/wgcfg/wgcfg_clone.go @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. +// 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. |
