-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
61 lines (48 loc) · 1.86 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
build:
go build ./cmd/tfplugingen-framework
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-framework generate all \
--input ./internal/cmd/testdata/custom_and_external/ir.json \
--package specified \
--output ./internal/cmd/testdata/custom_and_external/all_output/specified_pkg_name
go run ./cmd/tfplugingen-framework generate all \
--input ./internal/cmd/testdata/custom_and_external/ir.json \
--output ./internal/cmd/testdata/custom_and_external/all_output/default_pkg_name
go run ./cmd/tfplugingen-framework generate resources \
--input ./internal/cmd/testdata/custom_and_external/ir.json \
--package generated \
--output ./internal/cmd/testdata/custom_and_external/resources_output
go run ./cmd/tfplugingen-framework generate data-sources \
--input ./internal/cmd/testdata/custom_and_external/ir.json \
--package generated \
--output ./internal/cmd/testdata/custom_and_external/data_sources_output
go run ./cmd/tfplugingen-framework generate provider \
--input ./internal/cmd/testdata/custom_and_external/ir.json \
--package generated \
--output ./internal/cmd/testdata/custom_and_external/provider_output
go run ./cmd/tfplugingen-framework scaffold resource \
--name thing \
--force \
--package scaffold \
--output-dir ./internal/cmd/testdata/scaffold/resource
go run ./cmd/tfplugingen-framework scaffold data-source \
--name thing \
--force \
--package scaffold \
--output-dir ./internal/cmd/testdata/scaffold/data_source
go run ./cmd/tfplugingen-framework scaffold provider \
--name examplecloud \
--force \
--package scaffold \
--output-dir ./internal/cmd/testdata/scaffold/provider
.PHONY: lint fmt test