aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRadek Simko <radek.simko@gmail.com>2018-04-30 16:11:27 +0100
committerGitHub <noreply@github.com>2018-04-30 16:11:27 +0100
commite8d9a4b11f4e593fd22f9c92bfeab99bb81b2503 (patch)
tree45c20791a1a167b32e4d063e73513f3ad8b618a8
parentc608b7f48e1c463f7c2c7bb50d51d7ad87925db4 (diff)
parentc1b49eba74979e582ab95964b098241af935ff50 (diff)
downloadterraform-provider-statuscake-e8d9a4b11f4e593fd22f9c92bfeab99bb81b2503.tar.gz
terraform-provider-statuscake-e8d9a4b11f4e593fd22f9c92bfeab99bb81b2503.tar.zst
terraform-provider-statuscake-e8d9a4b11f4e593fd22f9c92bfeab99bb81b2503.zip
Merge pull request #13 from terraform-providers/f-make-website
make: Add website + website-test targets
-rw-r--r--.travis.yml5
-rw-r--r--GNUmakefile20
2 files changed, 22 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index 1ba1993..0eabb81 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,7 @@
1dist: trusty 1dist: trusty
2sudo: false 2sudo: required
3services:
4- docker
3language: go 5language: go
4go: 6go:
5- 1.8.1 7- 1.8.1
@@ -16,6 +18,7 @@ script:
16- make test 18- make test
17- make vendor-status 19- make vendor-status
18- make vet 20- make vet
21- make website-test
19 22
20branches: 23branches:
21 only: 24 only:
diff --git a/GNUmakefile b/GNUmakefile
index c9eacb4..98a0985 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,5 +1,7 @@
1TEST?=$$(go list ./... |grep -v 'vendor') 1TEST?=$$(go list ./... |grep -v 'vendor')
2GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor) 2GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
3WEBSITE_REPO=github.com/hashicorp/terraform-website
4PKG_NAME=statuscake
3 5
4default: build 6default: build
5 7
@@ -38,10 +40,24 @@ vendor-status:
38test-compile: 40test-compile:
39 @if [ "$(TEST)" = "./..." ]; then \ 41 @if [ "$(TEST)" = "./..." ]; then \
40 echo "ERROR: Set TEST to a specific package. For example,"; \ 42 echo "ERROR: Set TEST to a specific package. For example,"; \
41 echo " make test-compile TEST=./aws"; \ 43 echo " make test-compile TEST=./$(PKG_NAME)"; \
42 exit 1; \ 44 exit 1; \
43 fi 45 fi
44 go test -c $(TEST) $(TESTARGS) 46 go test -c $(TEST) $(TESTARGS)
45 47
46.PHONY: build test testacc vet fmt fmtcheck errcheck vendor-status test-compile 48website:
49ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
50 echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
51 git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
52endif
53 @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
54
55website-test:
56ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
57 echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
58 git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
59endif
60 @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
61
62.PHONY: build test testacc vet fmt fmtcheck errcheck vendor-status test-compile website website-test
47 63