add controllers license to Makefile: make license.controller (#3707)

This commit is contained in:
Jiahui
2023-08-18 11:57:17 +08:00
committed by GitHub
parent 0d129f80f6
commit c236f8cf7a
87 changed files with 1188 additions and 1 deletions
+2
View File
@@ -60,7 +60,9 @@ endif
# Linux command settings
CODE_DIRS := $(ROOT_DIR)/pkg $(ROOT_DIR)/cmd $(ROOT_DIR)/test $(ROOT_DIR)/staging
CONTROLLERS_DIR := $(ROOT_DIR)/controllers
FIND := find $(CODE_DIRS)
FIND_CONTROLLERS := find $(CONTROLLERS_DIR)
# verbose settings
ifndef V
+6 -1
View File
@@ -20,5 +20,10 @@ license.verify: tools.verify.addlicense
@$(TOOLS_DIR)/addlicense -check -ignore **/test/** -f $(TEMPLATE) $(CODE_DIRS)
.PHONY: license.add
license.add: tools.verify.addlicense
license.add: tools.verify.addlicense license.controller.add
@$(TOOLS_DIR)/addlicense -y $(shell date +"%Y") -c "sealos." -f $(TEMPLATE) $(CODE_DIRS)
.PHONY: license.controller.add
license.controller.add: tools.verify.addlicense
@echo "===========> Formating controllers codes"
@$(FIND_CONTROLLERS) -type f -name '*.go' | xargs $(TOOLS_DIR)/addlicense -v -y $(shell date +"%Y") -c "sealos." -f $(TEMPLATE)