@@ -4,6 +4,7 @@ GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
44PKG_NAME =sysdig
55WEBSITE_REPO =github.com/hashicorp/terraform-website
66VERSION =$(shell [ ! -z `git tag -l --contains HEAD` ] && git tag -l --contains HEAD || git rev-parse --short HEAD)
7+ GOPATH =$(shell go env GOPATH)
78
89default : build
910
@@ -59,18 +60,28 @@ release: fmtcheck
5960 done \
6061 done
6162
63+ .PHONY : website
6264website :
6365ifeq (,$(wildcard $(GOPATH ) /src/$(WEBSITE_REPO ) ) )
6466 echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
6567 git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
68+ (cd $(GOPATH)/src/$(WEBSITE_REPO); \
69+ ln -s $(shell pwd) ext/providers/sysdig; \
70+ ln -s ../../../ext/providers/sysdig/website/sysdig.erb content/source/layouts/sysdig.erb; \
71+ ln -s ../../../../ext/providers/sysdig/website/docs content/source/docs/providers/sysdig; \
72+ )
6673endif
67- @ $(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
74+ $(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
6875
76+ .PHONY : website-test
6977website-test :
7078ifeq (,$(wildcard $(GOPATH ) /src/$(WEBSITE_REPO ) ) )
7179 echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
7280 git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
81+ (cd $(GOPATH)/src/$(WEBSITE_REPO); \
82+ ln -s $(shell pwd) ext/providers/sysdig; \
83+ ln -s ../../../ext/providers/sysdig/website/sysdig.erb content/source/layouts/sysdig.erb; \
84+ ln -s ../../../../ext/providers/sysdig/website/docs content/source/docs/providers/sysdig; \
85+ )
7386endif
7487 @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
75-
76- .PHONY : build sweep test testacc vet fmt fmtcheck errcheck vendor-status test-compile website website-test
0 commit comments