github.com/cycloidio/terraform@v1.1.10-0.20220513142504-76d5c768dc63/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  	@echo "==> Downloading latest Docker image..."
    31  	@docker pull hashicorp/terraform-website:full
    32  	@echo "==> Starting core website in Docker..."
    33  	@docker run \
    34  		--interactive \
    35  		--rm \
    36  		--tty \
    37  		--workdir "/website" \
    38  		--volume "$(shell pwd):/website/ext/terraform" \
    39  		--publish "3000:3000" \
    40  		hashicorp/terraform-website:full \
    41  		npm start
    42  
    43  # disallow any parallelism (-j) for Make. This is necessary since some
    44  # commands during the build process create temporary files that collide
    45  # under parallel conditions.
    46  .NOTPARALLEL:
    47  
    48  .PHONY: fmtcheck generate protobuf website website-test staticcheck