github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/Makefile (about) 1 WEBSITE_REPO=github.com/hashicorp/terraform-website 2 VERSION?="0.3.44" 3 4 # generate runs `go generate` to build the dynamically generated 5 # source files, except the protobuf stubs which are built instead with 6 # "make protobuf". 7 generate: 8 go generate ./... 9 10 # We separate the protobuf generation because most development tasks on 11 # Terraform do not involve changing protobuf files and protoc is not a 12 # go-gettable dependency and so getting it installed can be inconvenient. 13 # 14 # If you are working on changes to protobuf interfaces, run this Makefile 15 # target to be sure to regenerate all of the protobuf stubs using the expected 16 # versions of protoc and the protoc Go plugins. 17 protobuf: 18 go run ./tools/protobuf-compile . 19 20 fmtcheck: 21 @sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" 22 23 staticcheck: 24 @sh -c "'$(CURDIR)/scripts/staticcheck.sh'" 25 26 exhaustive: 27 @sh -c "'$(CURDIR)/scripts/exhaustive.sh'" 28 29 website: 30 ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) 31 echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." 32 git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO) 33 endif 34 $(eval WEBSITE_PATH := $(GOPATH)/src/$(WEBSITE_REPO)) 35 @echo "==> Starting core website in Docker..." 36 @docker run \ 37 --interactive \ 38 --rm \ 39 --tty \ 40 --publish "4567:4567" \ 41 --publish "35729:35729" \ 42 --volume "$(shell pwd)/website:/website" \ 43 --volume "$(shell pwd):/ext/terraform" \ 44 --volume "$(WEBSITE_PATH)/content:/terraform-website" \ 45 --volume "$(WEBSITE_PATH)/content/source/assets:/website/docs/assets" \ 46 --volume "$(WEBSITE_PATH)/content/source/layouts:/website/docs/layouts" \ 47 --workdir /terraform-website \ 48 hashicorp/middleman-hashicorp:${VERSION} 49 50 # disallow any parallelism (-j) for Make. This is necessary since some 51 # commands during the build process create temporary files that collide 52 # under parallel conditions. 53 .NOTPARALLEL: 54 55 .PHONY: fmtcheck generate protobuf website website-test staticcheck