-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
48 lines (35 loc) · 1.43 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
ROOT_DIR ?= $(shell git rev-parse --show-toplevel)
SCRIPTS_BASE ?= $(ROOT_DIR)/scripts
GOLANG_CI_YAML_PATH ?= ${ROOT_DIR}/golang-ci.yaml
GOLANG_CI_ARGS ?= --allow-parallel-runners --timeout=5m --config=${GOLANG_CI_YAML_PATH}
# SETUP AND TOOL INITIALIZATION TASKS
project-help:
@$(SCRIPTS_BASE)/project.sh help
project-tools:
@$(SCRIPTS_BASE)/project.sh tools
# LINT
lint-golangci-lint:
@echo "Linting with golangci-lint"
@$(SCRIPTS_BASE)/lint-golangci-lint.sh ${skip-non-generated-files}
lint-scripts:
@echo "Linting scripts"
@cd ${ROOT_DIR}/scripts && golangci-lint run ${GOLANG_CI_ARGS}
sync-tidy:
@echo "Syncing and tidying dependencies"
@$(SCRIPTS_BASE)/sync-tidy.sh
lint: sync-tidy
@$(MAKE) --no-print-directory lint-golangci-lint skip-non-generated-files=${skip-non-generated-files}
# TEST
test-go:
@echo "Running Go tests"
@$(SCRIPTS_BASE)/test-go.sh ${skip-non-generated-files}
test-scripts:
@echo "Running Go tests for scripts"
@go test $(ROOT_DIR)/scripts/... ${GOTEST_ARGS}
test:
@$(MAKE) --no-print-directory test-go skip-non-generated-files=${skip-non-generated-files}
# AUTOMATIC TAG
sdk-tag-services:
@go run $(SCRIPTS_BASE)/automatic_tag.go --update-type ${update-type} --ssh-private-key-file-path ${ssh-private-key-file-path};
sdk-tag-core:
@go run $(SCRIPTS_BASE)/automatic_tag.go --update-type ${update-type} --ssh-private-key-file-path ${ssh-private-key-file-path} --target core;