forked from hashicorp/terraform-plugin-codegen-openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (34 loc) · 1.46 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
build:
go build ./cmd/tfplugingen-openapi
lint:
golangci-lint run
fmt:
gofmt -s -w -e .
test:
go test $$(go list ./... | grep -v /output) -v -cover -timeout=120s -parallel=4
# Generate copywrite headers
generate:
cd tools; go generate ./...
# Regenerate testdata folder
testdata:
go run ./cmd/tfplugingen-openapi generate \
--config ./internal/cmd/testdata/petstore3/generator_config.yml \
--output ./internal/cmd/testdata/petstore3/provider_code_spec.json \
./internal/cmd/testdata/petstore3/openapi_spec.json
go run ./cmd/tfplugingen-openapi generate \
--config ./internal/cmd/testdata/github/generator_config.yml \
--output ./internal/cmd/testdata/github/provider_code_spec.json \
./internal/cmd/testdata/github/openapi_spec.json
go run ./cmd/tfplugingen-openapi generate \
--config ./internal/cmd/testdata/scaleway/generator_config.yml \
--output ./internal/cmd/testdata/scaleway/provider_code_spec.json \
./internal/cmd/testdata/scaleway/openapi_spec.yml
go run ./cmd/tfplugingen-openapi generate \
--config ./internal/cmd/testdata/edgecase/generator_config.yml \
--output ./internal/cmd/testdata/edgecase/provider_code_spec.json \
./internal/cmd/testdata/edgecase/openapi_spec.yml
go run ./cmd/tfplugingen-openapi generate \
--config ./internal/cmd/testdata/kubernetes/generator_config.yml \
--output ./internal/cmd/testdata/kubernetes/provider_code_spec.json \
./internal/cmd/testdata/kubernetes/openapi_spec.json
.PHONY: lint fmt test