diff --git a/.github/workflows/license-headers.yml b/.github/workflows/license-headers.yml new file mode 100644 index 0000000..2a78455 --- /dev/null +++ b/.github/workflows/license-headers.yml @@ -0,0 +1,19 @@ +on: + push: + branches: + - "main" + - "release-branch/*" + pull_request: + # all PRs on all branches + merge_group: + branches: + - "main" + +jobs: + license_headers: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + - name: check license headers + run: ./scripts/check_license_headers.sh . diff --git a/android/src/main/java/com/tailscale/ipn/App.java b/android/src/main/java/com/tailscale/ipn/App.java index d44efaf..cae86c9 100644 --- a/android/src/main/java/com/tailscale/ipn/App.java +++ b/android/src/main/java/com/tailscale/ipn/App.java @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android/src/main/java/com/tailscale/ipn/DnsConfig.java b/android/src/main/java/com/tailscale/ipn/DnsConfig.java index dfe6e8c..19209de 100644 --- a/android/src/main/java/com/tailscale/ipn/DnsConfig.java +++ b/android/src/main/java/com/tailscale/ipn/DnsConfig.java @@ -1,6 +1,5 @@ -// Copyright (c) 2021 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android/src/main/java/com/tailscale/ipn/IPNActivity.java b/android/src/main/java/com/tailscale/ipn/IPNActivity.java index 340697d..4501d43 100644 --- a/android/src/main/java/com/tailscale/ipn/IPNActivity.java +++ b/android/src/main/java/com/tailscale/ipn/IPNActivity.java @@ -1,6 +1,5 @@ -// Copyright (c) 2021 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android/src/main/java/com/tailscale/ipn/IPNReceiver.java b/android/src/main/java/com/tailscale/ipn/IPNReceiver.java index ea6cb75..a299500 100644 --- a/android/src/main/java/com/tailscale/ipn/IPNReceiver.java +++ b/android/src/main/java/com/tailscale/ipn/IPNReceiver.java @@ -1,6 +1,5 @@ -// Copyright (c) 2023 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android/src/main/java/com/tailscale/ipn/IPNService.java b/android/src/main/java/com/tailscale/ipn/IPNService.java index fee5b9e..9c4dbb1 100644 --- a/android/src/main/java/com/tailscale/ipn/IPNService.java +++ b/android/src/main/java/com/tailscale/ipn/IPNService.java @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android/src/main/java/com/tailscale/ipn/Peer.java b/android/src/main/java/com/tailscale/ipn/Peer.java index 22cf9c9..a5c49e7 100644 --- a/android/src/main/java/com/tailscale/ipn/Peer.java +++ b/android/src/main/java/com/tailscale/ipn/Peer.java @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android/src/main/java/com/tailscale/ipn/QuickToggleService.java b/android/src/main/java/com/tailscale/ipn/QuickToggleService.java index ec341be..f77a30c 100644 --- a/android/src/main/java/com/tailscale/ipn/QuickToggleService.java +++ b/android/src/main/java/com/tailscale/ipn/QuickToggleService.java @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android/src/main/java/com/tailscale/ipn/StartVPNWorker.java b/android/src/main/java/com/tailscale/ipn/StartVPNWorker.java index e4a0b4d..5defe23 100644 --- a/android/src/main/java/com/tailscale/ipn/StartVPNWorker.java +++ b/android/src/main/java/com/tailscale/ipn/StartVPNWorker.java @@ -1,6 +1,5 @@ -// Copyright (c) 2023 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android/src/main/java/com/tailscale/ipn/StopVPNWorker.java b/android/src/main/java/com/tailscale/ipn/StopVPNWorker.java index 296ce28..2d2a378 100644 --- a/android/src/main/java/com/tailscale/ipn/StopVPNWorker.java +++ b/android/src/main/java/com/tailscale/ipn/StopVPNWorker.java @@ -1,6 +1,5 @@ -// Copyright (c) 2023 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIClient.kt b/android/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIClient.kt index 3f1ab79..d9421b3 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIClient.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIClient.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.localapi diff --git a/android/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIRequest.kt b/android/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIRequest.kt index 836f63e..4829bbb 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIRequest.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIRequest.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.localapi diff --git a/android/src/main/java/com/tailscale/ipn/ui/localapi/Result.kt b/android/src/main/java/com/tailscale/ipn/ui/localapi/Result.kt index a80f925..5965089 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/localapi/Result.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/localapi/Result.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.localapi diff --git a/android/src/main/java/com/tailscale/ipn/ui/model/Dns.kt b/android/src/main/java/com/tailscale/ipn/ui/model/Dns.kt index c1f97fe..cf047a0 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/model/Dns.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/model/Dns.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.model diff --git a/android/src/main/java/com/tailscale/ipn/ui/model/Ipn.kt b/android/src/main/java/com/tailscale/ipn/ui/model/Ipn.kt index 6b1c007..32d76ac 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/model/Ipn.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/model/Ipn.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.model diff --git a/android/src/main/java/com/tailscale/ipn/ui/model/IpnState.kt b/android/src/main/java/com/tailscale/ipn/ui/model/IpnState.kt index f187e5c..826ca42 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/model/IpnState.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/model/IpnState.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.model diff --git a/android/src/main/java/com/tailscale/ipn/ui/model/NetMap.kt b/android/src/main/java/com/tailscale/ipn/ui/model/NetMap.kt index 623b104..57ce19d 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/model/NetMap.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/model/NetMap.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.model diff --git a/android/src/main/java/com/tailscale/ipn/ui/model/TailCfg.kt b/android/src/main/java/com/tailscale/ipn/ui/model/TailCfg.kt index 4e94f8e..5669300 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/model/TailCfg.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/model/TailCfg.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.model diff --git a/android/src/main/java/com/tailscale/ipn/ui/model/Types.kt b/android/src/main/java/com/tailscale/ipn/ui/model/Types.kt index ff70f75..e0158c1 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/model/Types.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/model/Types.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.model diff --git a/android/src/main/java/com/tailscale/ipn/ui/notifier/Notifier.kt b/android/src/main/java/com/tailscale/ipn/ui/notifier/Notifier.kt index 2936ca3..df2acb4 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/notifier/Notifier.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/notifier/Notifier.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.notifier diff --git a/android/src/main/java/com/tailscale/ipn/ui/service/IpnManager.kt b/android/src/main/java/com/tailscale/ipn/ui/service/IpnManager.kt index 23cc17e..e4b8d36 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/service/IpnManager.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/service/IpnManager.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.service diff --git a/android/src/main/java/com/tailscale/ipn/ui/service/IpnModel.kt b/android/src/main/java/com/tailscale/ipn/ui/service/IpnModel.kt index 2ec3d79..2f0d5e3 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/service/IpnModel.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/service/IpnModel.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.service diff --git a/android/src/play/java/com/tailscale/ipn/Google.java b/android/src/play/java/com/tailscale/ipn/Google.java index 44f8226..44a4787 100644 --- a/android/src/play/java/com/tailscale/ipn/Google.java +++ b/android/src/play/java/com/tailscale/ipn/Google.java @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android_legacy/src/main/java/com/tailscale/ipn/App.java b/android_legacy/src/main/java/com/tailscale/ipn/App.java index d44efaf..cae86c9 100644 --- a/android_legacy/src/main/java/com/tailscale/ipn/App.java +++ b/android_legacy/src/main/java/com/tailscale/ipn/App.java @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android_legacy/src/main/java/com/tailscale/ipn/DnsConfig.java b/android_legacy/src/main/java/com/tailscale/ipn/DnsConfig.java index dfe6e8c..19209de 100644 --- a/android_legacy/src/main/java/com/tailscale/ipn/DnsConfig.java +++ b/android_legacy/src/main/java/com/tailscale/ipn/DnsConfig.java @@ -1,6 +1,5 @@ -// Copyright (c) 2021 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android_legacy/src/main/java/com/tailscale/ipn/IPNActivity.java b/android_legacy/src/main/java/com/tailscale/ipn/IPNActivity.java index 340697d..4501d43 100644 --- a/android_legacy/src/main/java/com/tailscale/ipn/IPNActivity.java +++ b/android_legacy/src/main/java/com/tailscale/ipn/IPNActivity.java @@ -1,6 +1,5 @@ -// Copyright (c) 2021 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android_legacy/src/main/java/com/tailscale/ipn/IPNReceiver.java b/android_legacy/src/main/java/com/tailscale/ipn/IPNReceiver.java index ea6cb75..a299500 100644 --- a/android_legacy/src/main/java/com/tailscale/ipn/IPNReceiver.java +++ b/android_legacy/src/main/java/com/tailscale/ipn/IPNReceiver.java @@ -1,6 +1,5 @@ -// Copyright (c) 2023 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android_legacy/src/main/java/com/tailscale/ipn/IPNService.java b/android_legacy/src/main/java/com/tailscale/ipn/IPNService.java index fee5b9e..9c4dbb1 100644 --- a/android_legacy/src/main/java/com/tailscale/ipn/IPNService.java +++ b/android_legacy/src/main/java/com/tailscale/ipn/IPNService.java @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android_legacy/src/main/java/com/tailscale/ipn/Peer.java b/android_legacy/src/main/java/com/tailscale/ipn/Peer.java index 22cf9c9..a5c49e7 100644 --- a/android_legacy/src/main/java/com/tailscale/ipn/Peer.java +++ b/android_legacy/src/main/java/com/tailscale/ipn/Peer.java @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android_legacy/src/main/java/com/tailscale/ipn/QuickToggleService.java b/android_legacy/src/main/java/com/tailscale/ipn/QuickToggleService.java index ec341be..f77a30c 100644 --- a/android_legacy/src/main/java/com/tailscale/ipn/QuickToggleService.java +++ b/android_legacy/src/main/java/com/tailscale/ipn/QuickToggleService.java @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android_legacy/src/main/java/com/tailscale/ipn/StartVPNWorker.java b/android_legacy/src/main/java/com/tailscale/ipn/StartVPNWorker.java index e4a0b4d..5defe23 100644 --- a/android_legacy/src/main/java/com/tailscale/ipn/StartVPNWorker.java +++ b/android_legacy/src/main/java/com/tailscale/ipn/StartVPNWorker.java @@ -1,6 +1,5 @@ -// Copyright (c) 2023 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android_legacy/src/main/java/com/tailscale/ipn/StopVPNWorker.java b/android_legacy/src/main/java/com/tailscale/ipn/StopVPNWorker.java index 296ce28..2d2a378 100644 --- a/android_legacy/src/main/java/com/tailscale/ipn/StopVPNWorker.java +++ b/android_legacy/src/main/java/com/tailscale/ipn/StopVPNWorker.java @@ -1,6 +1,5 @@ -// Copyright (c) 2023 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/android_legacy/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIClient.kt b/android_legacy/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIClient.kt index 9741679..e065098 100644 --- a/android_legacy/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIClient.kt +++ b/android_legacy/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIClient.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.localapi diff --git a/android_legacy/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIRequest.kt b/android_legacy/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIRequest.kt index c9380d2..83f5705 100644 --- a/android_legacy/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIRequest.kt +++ b/android_legacy/src/main/java/com/tailscale/ipn/ui/localapi/LocalAPIRequest.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.localapi diff --git a/android_legacy/src/main/java/com/tailscale/ipn/ui/localapi/Result.kt b/android_legacy/src/main/java/com/tailscale/ipn/ui/localapi/Result.kt index 7d9ec5a..4180171 100644 --- a/android_legacy/src/main/java/com/tailscale/ipn/ui/localapi/Result.kt +++ b/android_legacy/src/main/java/com/tailscale/ipn/ui/localapi/Result.kt @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn.ui.localapi diff --git a/android_legacy/src/play/java/com/tailscale/ipn/Google.java b/android_legacy/src/play/java/com/tailscale/ipn/Google.java index 44f8226..44a4787 100644 --- a/android_legacy/src/play/java/com/tailscale/ipn/Google.java +++ b/android_legacy/src/play/java/com/tailscale/ipn/Google.java @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package com.tailscale.ipn; diff --git a/cmd/jni/jni.go b/cmd/jni/jni.go index 24f8ed4..0cfcb49 100644 --- a/cmd/jni/jni.go +++ b/cmd/jni/jni.go @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause // Package jni implements various helper functions for communicating with the Android JVM // though JNI. diff --git a/cmd/localapiservice/localapi_test.go b/cmd/localapiservice/localapi_test.go index 0aef288..97f0d06 100644 --- a/cmd/localapiservice/localapi_test.go +++ b/cmd/localapiservice/localapi_test.go @@ -1,3 +1,6 @@ +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause + package localapiservice import ( diff --git a/cmd/localapiservice/localapiservice.go b/cmd/localapiservice/localapiservice.go index ad925d4..6fa88f5 100644 --- a/cmd/localapiservice/localapiservice.go +++ b/cmd/localapiservice/localapiservice.go @@ -1,3 +1,6 @@ +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause + package localapiservice import ( diff --git a/cmd/localapiservice/localapishim.go b/cmd/localapiservice/localapishim.go index ebb121e..d17c6db 100644 --- a/cmd/localapiservice/localapishim.go +++ b/cmd/localapiservice/localapishim.go @@ -1,6 +1,5 @@ -// Copyright (c) 2024 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package localapiservice diff --git a/cmd/localapiservice/response.go b/cmd/localapiservice/response.go index 477da84..9e30ebc 100644 --- a/cmd/localapiservice/response.go +++ b/cmd/localapiservice/response.go @@ -1,3 +1,6 @@ +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause + package localapiservice import ( diff --git a/cmd/tailscale/backend.go b/cmd/tailscale/backend.go index 90b8abd..b8f75c6 100644 --- a/cmd/tailscale/backend.go +++ b/cmd/tailscale/backend.go @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package main @@ -15,8 +14,8 @@ import ( "strings" "time" - "github.com/tailscale/wireguard-go/tun" "github.com/tailscale/tailscale-android/cmd/jni" + "github.com/tailscale/wireguard-go/tun" "golang.org/x/sys/unix" "tailscale.com/ipn" diff --git a/cmd/tailscale/callbacks.go b/cmd/tailscale/callbacks.go index be3c793..6f5d1d5 100644 --- a/cmd/tailscale/callbacks.go +++ b/cmd/tailscale/callbacks.go @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package main diff --git a/cmd/tailscale/main.go b/cmd/tailscale/main.go index f477190..e98718f 100644 --- a/cmd/tailscale/main.go +++ b/cmd/tailscale/main.go @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package main diff --git a/cmd/tailscale/multitun.go b/cmd/tailscale/multitun.go index 8f2d016..4531f88 100644 --- a/cmd/tailscale/multitun.go +++ b/cmd/tailscale/multitun.go @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package main diff --git a/cmd/tailscale/pprof.go b/cmd/tailscale/pprof.go index 9b81a47..e221874 100644 --- a/cmd/tailscale/pprof.go +++ b/cmd/tailscale/pprof.go @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause //go:build pprof // +build pprof diff --git a/cmd/tailscale/store.go b/cmd/tailscale/store.go index 0da0c5c..e3f62d4 100644 --- a/cmd/tailscale/store.go +++ b/cmd/tailscale/store.go @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package main diff --git a/cmd/tailscale/tools.go b/cmd/tailscale/tools.go index df1b621..6267d59 100644 --- a/cmd/tailscale/tools.go +++ b/cmd/tailscale/tools.go @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause //go:build tools // +build tools diff --git a/cmd/tailscale/ui.go b/cmd/tailscale/ui.go index 0e28a17..1040039 100644 --- a/cmd/tailscale/ui.go +++ b/cmd/tailscale/ui.go @@ -1,6 +1,5 @@ -// Copyright (c) 2020 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. +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause package main diff --git a/scripts/check_license_headers.sh b/scripts/check_license_headers.sh new file mode 100755 index 0000000..aaa9d13 --- /dev/null +++ b/scripts/check_license_headers.sh @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Copyright (c) Tailscale Inc & AUTHORS +# SPDX-License-Identifier: BSD-3-Clause +# +# check_license_headers.sh checks that source files in the given +# directory tree have a correct-looking Tailscale license header. + +check_file() { + got=$1 + + want=$( + cat <&2 + exit 1 +fi + +fail=0 +for file in $(find $1 \( -name '*.go' -or -name '*.tsx' -or -name '*.ts' -or -name '*.kt' -or -name '*.java' -not -name '*.config.ts' \) -not -path '*/.git/*' -not -path '*/node_modules/*'); do + case $file in + *) + header="$(head -2 $file)" + ;; + esac + if [ ! -z "$header" ]; then + if ! check_file "$header"; then + fail=1 + echo "${file#$1/} doesn't have the right copyright header:" + echo "$header" | sed -e 's/^/ /g' + fi + fi +done + +if [ $fail -ne 0 ]; then + exit 1 +fi