Skip to content

Commit d99559a

Browse files
committed
refactor: rename GNUmakefile -> Makefile and split PHONY targets
1 parent b591a15 commit d99559a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

GNUmakefile renamed to Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
.PHONY: all build deps generate help test openapi_generate
2-
SWAGGER_SPEC=swagger.yml
1+
SWAGGER_SPEC := swagger.yml
32

43
help: ## Show this help.
54
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
5+
.PHONY: help
66

77
all: deps openapi_generate generate test testacc # build
8+
.PHONY: all
89

910
build: ## Build Terraform provider.
1011
go install .
12+
.PHONY: build
1113

1214
deps: ## Install dependencies.
1315
go mod download
16+
.PHONY: deps
1417

1518
generate: ## Generate Terraform docs.
1619
go generate
20+
.PHONY: generate
1721

1822
openapi_generate: ## Generate the go code from the OpenAPI spec.
1923
docker run --rm \
@@ -26,10 +30,13 @@ openapi_generate: ## Generate the go code from the OpenAPI spec.
2630
sed -i '' 's/int32/int64/g' internal/netlifyapi/model_*.go ; \
2731
sed -i '' 's/int32/int64/g' internal/netlifyapi/api_*.go ; \
2832
sed -i '' 's/return e.error/return fmt.Sprintf("%s: %s", e.error, e.body)/g' internal/netlifyapi/client.go
33+
.PHONY: openapi_generate
2934

3035
test: ## Test the go code.
3136
go test -v ./...
37+
.PHONY: test
3238

3339
testacc: ## Test the go code and run acceptance tests.
3440
TF_ACC=1 go test ./... -v $(TESTARGS)
3541
# -timeout 120m
42+
.PHONY: testacc

0 commit comments

Comments
 (0)