github.com/winebarrel/terraform-provider-lambdazip@v0.6.1-0.20240313233639-361839f8c5c5/GNUmakefile (about)

     1  .PHONY: build
     2  build: vet test
     3  	go build
     4  
     5  .PHONY: vet
     6  vet:
     7  	go vet ./...
     8  
     9  .PHONY: test
    10  test:
    11  	go test -v -count=1 ./...
    12  
    13  .PHONY: lint
    14  lint:
    15  	golangci-lint run
    16  
    17  .PHONY: clean
    18  clean:
    19  	rm -f terraform-provider-lambdazip
    20  
    21  dev.tfrc: dev.tfrc.tpl
    22  	sed "s|{{PATH_TO_PROVIDER}}|$(shell pwd)|" dev.tfrc.tpl > dev.tfrc
    23  
    24  .PHONY: tf-plan
    25  tf-plan: build dev.tfrc
    26  	TF_CLI_CONFIG_FILE=dev.tfrc terraform plan
    27  
    28  .PHONY: tf-apply
    29  tf-apply: build dev.tfrc
    30  	TF_CLI_CONFIG_FILE=dev.tfrc terraform apply -auto-approve
    31  
    32  .PHONY: tf-clean
    33  tf-clean: clean
    34  	rm -f dev.tfrc terraform.tfstate*
    35  
    36  # cf. https://developer.hashicorp.com/terraform/tutorials/providers-plugin-framework/providers-plugin-framework-documentation-generation
    37  .PHONY: docs
    38  docs:
    39  	go generate ./...