chore: Enable copywrite check & add ignore_year1 flag
This commit is contained in:
1 parent
6be0dacda5
commit
b0dfa8af17
8 files changed
+48
-11
No files matched your search
@@ -27,6 +27,7 @@ tools: golangci-lint
|
||||
go generate -tags tools tools/tools.go
|
||||
go install github.com/bufbuild/buf/cmd/buf@v1.27.2
|
||||
go install github.com/mfridman/tparse@v0.13.1
|
||||
go install github.com/hashicorp/copywrite@v0.25.2
|
||||
|
||||
# golangci-lint recommends installing the binary directly, instead of using go get
|
||||
# See the note: https://golangci-lint.run/usage/install/#install-from-source
|
||||
@@ -145,7 +146,7 @@ perms-table:
|
||||
@go run internal/website/permstable/permstable.go
|
||||
|
||||
.PHONY: gen
|
||||
gen: cleangen proto api cli perms-table fmt #copywrite - Removing copywrite; we will need to switch to IBM's tooling, when available
|
||||
gen: cleangen copywrite proto api cli perms-table fmt
|
||||
|
||||
### oplog requires protoc-gen-go v1.20.0 or later
|
||||
# GO111MODULE=on go get -u github.com/golang/protobuf/protoc-gen-go@v1.40
|
||||
@@ -290,16 +291,19 @@ protolint:
|
||||
cd internal/proto && buf breaking --against 'https://github.com/hashicorp/boundary.git#branch=stable-website,subdir=internal/proto' \
|
||||
--config buf.breaking.wire.yaml
|
||||
|
||||
# Removing copywrite; we will need to switch to IBM's tooling, when available
|
||||
#.PHONY: copywrite
|
||||
#copywrite:
|
||||
# copywrite headers
|
||||
# In the protobuf API directories, remove the BUSL headers
|
||||
# and rerun copywrite with the directory specific configuration.
|
||||
# cd internal/proto/controller/api && find . -type f -name '*.proto' -exec sed -i '1,3d' {} + && copywrite headers
|
||||
# cd internal/proto/controller/custom_options && find . -type f -name '*.proto' -exec sed -i '1,3d' {} + && copywrite headers
|
||||
# cd internal/proto/plugin && find . -type f -name '*.proto' -exec sed -i '1,3d' {} + && copywrite headers
|
||||
# cd internal/proto/worker/proxy/v1 && find . -type f -name '*.proto' -exec sed -i '1,3d' {} + && copywrite headers
|
||||
.PHONY: copywrite
|
||||
copywrite:
|
||||
copywrite headers
|
||||
# Run copywrite in specific subdirectories that require different licenses (e.g., MPL-2.0)
|
||||
# or specific ignore rules for generated files (.gen.go, .pb.go).
|
||||
# Note: We rely on the nested .copywrite.hcl files inside these directories to manage
|
||||
# the SPDX license identifiers and years correctly
|
||||
cd internal/proto/controller/api && copywrite headers
|
||||
cd internal/proto/controller/custom_options && copywrite headers
|
||||
cd internal/proto/plugin && copywrite headers
|
||||
cd internal/proto/worker/proxy/v1 && copywrite headers
|
||||
cd api && copywrite headers
|
||||
cd sdk && copywrite headers
|
||||
|
||||
.PHONY: website
|
||||
# must have nodejs and npm installed
|
||||
|
||||
Reference in new issue
Block a user