Skip to content

Commit

Permalink
Re-enable copywrite with hack (#3569)
Browse files Browse the repository at this point in the history
* Ignore license change commit from blame

This changed almost all the files in the repo

* Re-enable copywrite with hack

Adds a hack that removes existing copyright headers
from files before rerunning copywrite with directory
specific configuration.
  • Loading branch information
johanbrandhorst authored Aug 11, 2023
1 parent 29da0bc commit bae219d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ f69fbf22552deac9ec81503d629fb70919acabdb
# Added license headers
3c29308673a9fb64c68ca27e15b4c9017a2d597e
# Upgraded buf which updated protobuf files
982c9c263c5d7f9822cdae4d8fe38cac8e1ff98f
982c9c263c5d7f9822cdae4d8fe38cac8e1ff98f
# Updated license to BUSL
29da0bcb923236b59fad97c3a66708b4d7e15bfb
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ perms-table:
@go run internal/website/permstable/permstable.go

.PHONY: gen
gen: cleangen proto api cli perms-table fmt
gen: cleangen proto api cli perms-table fmt copywrite

### oplog requires protoc-gen-go v1.20.0 or later
# GO111MODULE=on go get -u github.com/golang/protobuf/protoc-gen-go@v1.40
Expand Down Expand Up @@ -263,6 +263,11 @@ protolint:
.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

.PHONY: website
# must have nodejs and npm installed
Expand Down
8 changes: 8 additions & 0 deletions internal/proto/controller/api/.copywrite.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schema_version = 1

project {
license = "MPL-2.0"
copyright_year = 2020

header_ignore = []
}
8 changes: 8 additions & 0 deletions internal/proto/controller/custom_options/.copywrite.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schema_version = 1

project {
license = "MPL-2.0"
copyright_year = 2020

header_ignore = []
}
8 changes: 8 additions & 0 deletions internal/proto/plugin/.copywrite.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schema_version = 1

project {
license = "MPL-2.0"
copyright_year = 2020

header_ignore = []
}

0 comments on commit bae219d

Please sign in to comment.