From c994eb48028141a6e6d56ee4db29fa46b534b2ee Mon Sep 17 00:00:00 2001 From: Mingcong Han Date: Sat, 28 Dec 2019 04:38:13 -0600 Subject: [PATCH] license: add license for script files (#14252) --- Dockerfile | 13 +++++++++++++ Makefile | 13 +++++++++++++ checkout-pr-branch.sh | 12 ++++++++++++ cmd/explaintest/run-tests.sh | 12 ++++++++++++ gitcookie.sh | 13 +++++++++++++ tools/check/check-gogenerate.sh | 13 +++++++++++++ tools/check/check-tidy.sh | 14 +++++++++++++- tools/check/check_parser_replace.sh | 13 +++++++++++++ tools/check/check_testSuite.sh | 12 ++++++++++++ util/testleak/add-leaktest.sh | 12 ++++++++++++ util/testleak/check-leaktest.sh | 12 ++++++++++++ 11 files changed, 138 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 20a183efed942..8ca9f24570bbb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,16 @@ +# Copyright 2019 PingCAP, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# See the License for the specific language governing permissions and +# limitations under the License. + # Builder image FROM golang:1.13-alpine as builder diff --git a/Makefile b/Makefile index 65b22f6b52f34..1caf36d9942a1 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,16 @@ +# Copyright 2019 PingCAP, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# See the License for the specific language governing permissions and +# limitations under the License. + PROJECT=tidb GOPATH ?= $(shell go env GOPATH) P=8 diff --git a/checkout-pr-branch.sh b/checkout-pr-branch.sh index 2f78588650a7d..ee0690b7e8e5c 100755 --- a/checkout-pr-branch.sh +++ b/checkout-pr-branch.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +# Copyright 2019 PingCAP, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# See the License for the specific language governing permissions and +# limitations under the License. # This script is used to checkout a TiDB PR branch in a forked repo. if test -z $1; then diff --git a/cmd/explaintest/run-tests.sh b/cmd/explaintest/run-tests.sh index f195392a0402d..34eb1e552a1a9 100755 --- a/cmd/explaintest/run-tests.sh +++ b/cmd/explaintest/run-tests.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +# Copyright 2019 PingCAP, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# See the License for the specific language governing permissions and +# limitations under the License. TIDB_TEST_STORE_NAME=$TIDB_TEST_STORE_NAME TIKV_PATH=$TIKV_PATH diff --git a/gitcookie.sh b/gitcookie.sh index 816a8e89ef4f1..a129bdca749b4 100644 --- a/gitcookie.sh +++ b/gitcookie.sh @@ -1,3 +1,16 @@ +# Copyright 2019 PingCAP, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# See the License for the specific language governing permissions and +# limitations under the License. + touch ~/.gitcookies chmod 0600 ~/.gitcookies diff --git a/tools/check/check-gogenerate.sh b/tools/check/check-gogenerate.sh index 608cc7acf8832..2eeb006cf0c7d 100755 --- a/tools/check/check-gogenerate.sh +++ b/tools/check/check-gogenerate.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2019 PingCAP, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# See the License for the specific language governing permissions and +# limitations under the License. + set -euo pipefail go generate ./... diff --git a/tools/check/check-tidy.sh b/tools/check/check-tidy.sh index b20710cfc27ea..5850a402fd3f0 100755 --- a/tools/check/check-tidy.sh +++ b/tools/check/check-tidy.sh @@ -1,5 +1,17 @@ #!/usr/bin/env bash - +# Copyright 2019 PingCAP, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# See the License for the specific language governing permissions and +# limitations under the License. +# # set is used to set the environment variables. # -e: exit immediately when a command returning a non-zero exit code. # -u: treat unset variables as an error. diff --git a/tools/check/check_parser_replace.sh b/tools/check/check_parser_replace.sh index 959a2748b55a4..efb7ca27f4d6a 100755 --- a/tools/check/check_parser_replace.sh +++ b/tools/check/check_parser_replace.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2019 PingCAP, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# See the License for the specific language governing permissions and +# limitations under the License. + set -uo pipefail grep "replace.*github.com/pingcap/parser" go.mod diff --git a/tools/check/check_testSuite.sh b/tools/check/check_testSuite.sh index 5ae8eceb44cdd..5d9766ddf24fa 100755 --- a/tools/check/check_testSuite.sh +++ b/tools/check/check_testSuite.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +# Copyright 2019 PingCAP, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# See the License for the specific language governing permissions and +# limitations under the License. set -euo pipefail diff --git a/util/testleak/add-leaktest.sh b/util/testleak/add-leaktest.sh index 723553eb0eddf..18b23d6da4f58 100755 --- a/util/testleak/add-leaktest.sh +++ b/util/testleak/add-leaktest.sh @@ -1,4 +1,16 @@ #!/bin/sh +# Copyright 2019 PingCAP, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# See the License for the specific language governing permissions and +# limitations under the License. # # Usage: add-leaktest.sh pkg/*_test.go diff --git a/util/testleak/check-leaktest.sh b/util/testleak/check-leaktest.sh index 8df9d57e2966a..62083b9014363 100755 --- a/util/testleak/check-leaktest.sh +++ b/util/testleak/check-leaktest.sh @@ -1,4 +1,16 @@ #!/bin/sh +# Copyright 2019 PingCAP, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# See the License for the specific language governing permissions and +# limitations under the License. # # Usage: check-leaktest.sh # It needs to run under the github.com/pingcap/tidb directory.