mirror of
https://github.com/labring/sealos.git
synced 2026-09-24 15:46:19 +08:00
add controllers license to Makefile: make license.controller (#3707)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user