Skip to content

Commit

Permalink
fix license
Browse files Browse the repository at this point in the history
Signed-off-by: liubo02 <[email protected]>
  • Loading branch information
liubog2008 committed Jan 9, 2025
1 parent 231178e commit 1dc3d07
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 19 deletions.
1 change: 0 additions & 1 deletion .github/licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ header:
- "**/go.work.sum"
- "**/LICENSE"
- "third_party/**"
- "pkg/**/*mock.go"


comment: on-failure
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ PD_API_PATH = $(ROOT)/pkg/timanager/apis/pd
GO_MODULE := github.com/pingcap/tidb-operator
OVERLAY_PKG_DIR = $(ROOT)/pkg/overlay
BOILERPLATE_FILE = $(ROOT)/hack/boilerplate/boilerplate.go.txt
MOCK_BOILERPLATE_FILE = $(ROOT)/hack/boilerplate/boilerplate.txt

KIND_VERSION ?= v0.24.0

Expand Down Expand Up @@ -93,7 +94,7 @@ tidy:

gengo: GEN_DIR ?= ./...
gengo: bin/mockgen
GOBIN=$(BIN_DIR) GO_MODULE=$(GO_MODULE) go generate $(GEN_DIR)
BOILERPLATE_FILE=${MOCK_BOILERPLATE_FILE} GOBIN=$(BIN_DIR) GO_MODULE=$(GO_MODULE) go generate $(GEN_DIR)

.PHONY: license
license: bin/license-eye
Expand Down
13 changes: 13 additions & 0 deletions hack/boilerplate/boilerplate.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2024 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,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
2 changes: 1 addition & 1 deletion pkg/pdapi/v1/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:generate ${GOBIN}/mockgen -destination mock_generated.go -package=pdapi ${GO_MODULE}/pkg/pdapi/v1 PDClient
//go:generate ${GOBIN}/mockgen -write_command_comment=false -copyright_file ${BOILERPLATE_FILE} -destination mock_generated.go -package=pdapi ${GO_MODULE}/pkg/pdapi/v1 PDClient
package pdapi

import (
Expand Down
6 changes: 1 addition & 5 deletions pkg/pdapi/v1/mock_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions pkg/timanager/pd/mock_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/timanager/pd/pd.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:generate ${GOBIN}/mockgen -destination mock_generated.go -package=pd ${GO_MODULE}/pkg/timanager/pd PDClient,StoreCache,MemberCache
//go:generate ${GOBIN}/mockgen -write_command_comment=false -copyright_file ${BOILERPLATE_FILE} -destination mock_generated.go -package=pd ${GO_MODULE}/pkg/timanager/pd PDClient,StoreCache,MemberCache
package pd

import (
Expand Down
18 changes: 14 additions & 4 deletions pkg/volumes/mock.go → pkg/volumes/mock_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/volumes/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:generate ${GOBIN}/mockgen -destination mock.go -package=volumes ${GO_MODULE}/pkg/volumes Modifier
//go:generate ${GOBIN}/mockgen -write_command_comment=false -copyright_file ${BOILERPLATE_FILE} -destination mock_generated.go -package=volumes ${GO_MODULE}/pkg/volumes Modifier
package volumes

import (
Expand Down

0 comments on commit 1dc3d07

Please sign in to comment.