diff options
author | Alexandre Garand <alexandre.garand@fretlink.com> | 2019-06-28 11:23:27 +0200 |
---|---|---|
committer | Alexandre Garand <alexandre.garand@fretlink.com> | 2019-06-28 11:23:27 +0200 |
commit | e17f219ab8ff104f73e3c0f7515a7bb437b03d56 (patch) | |
tree | de70594e9645a382a3a4cb4addec966e96bf71eb /GNUmakefile | |
parent | e2966ba7a0ba5e3f87787f0a276ca5f7f6b21bd7 (diff) | |
download | terraform-provider-mailgun-e17f219ab8ff104f73e3c0f7515a7bb437b03d56.tar.gz terraform-provider-mailgun-e17f219ab8ff104f73e3c0f7515a7bb437b03d56.tar.zst terraform-provider-mailgun-e17f219ab8ff104f73e3c0f7515a7bb437b03d56.zip |
add provider without ressources and makefile
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..0e2ce73 --- /dev/null +++ b/GNUmakefile | |||
@@ -0,0 +1,44 @@ | |||
1 | TEST?=$$(go list ./... |grep -v 'vendor') | ||
2 | GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor) | ||
3 | PKG_NAME=mailgun | ||
4 | |||
5 | default: build | ||
6 | |||
7 | build: fmtcheck | ||
8 | go install | ||
9 | |||
10 | test: fmtcheck | ||
11 | go test -i $(TEST) || exit 1 | ||
12 | echo $(TEST) | \ | ||
13 | xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4 | ||
14 | |||
15 | testacc: fmtcheck | ||
16 | TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m | ||
17 | |||
18 | vet: | ||
19 | @echo "go vet ." | ||
20 | @go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \ | ||
21 | echo ""; \ | ||
22 | echo "Vet found suspicious constructs. Please check the reported constructs"; \ | ||
23 | echo "and fix them if necessary before submitting the code for review."; \ | ||
24 | exit 1; \ | ||
25 | fi | ||
26 | |||
27 | fmt: | ||
28 | gofmt -w $(GOFMT_FILES) | ||
29 | |||
30 | fmtcheck: | ||
31 | @sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" | ||
32 | |||
33 | errcheck: | ||
34 | @sh -c "'$(CURDIR)/scripts/errcheck.sh'" | ||
35 | |||
36 | |||
37 | test-compile: | ||
38 | @if [ "$(TEST)" = "./..." ]; then \ | ||
39 | echo "ERROR: Set TEST to a specific package. For example,"; \ | ||
40 | echo " make test-compile TEST=./$(PKG_NAME)"; \ | ||
41 | exit 1; \ | ||
42 | fi | ||
43 | go test -c $(TEST) $(TESTARGS) | ||
44 | |||