forked from brainly/terraform-provider-redshift
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (30 loc) · 1013 Bytes
/
Makefile
File metadata and controls
38 lines (30 loc) · 1013 Bytes
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
TEST?=$$(go list ./... |grep -v 'vendor')
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
default: help
.PHONY: build
build: fmt ## Build and install provider binary
go install
.PHONY: test
test: fmt vet ## Run unit tests
go test $(TESTARGS) ./redshift
.PHONY: testacc
testacc: fmt ## Run acceptance tests
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -count=1 -timeout 120m
.PHONY: vet
vet: ## Run go vet command
@echo "go vet ."
@go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \
echo ""; \
echo "Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for review."; \
exit 1; \
fi
.PHONY: fmt
fmt: ## Run gofmt command
gofmt -w $(GOFMT_FILES)
.PHONY: doc
doc: ## Generate documentation files
@go generate
.PHONY: help
help: ## Show this help message
@grep -Eh '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'