-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
54 lines (48 loc) · 1.57 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
PKG_NAME=provider
OPENAPI_GENERATOR_JAR=/usr/local/Cellar/openapi-generator/6.6.0/libexec/openapi-generator-cli.jar
GO_POST_PROCESS_FILE="$(shell which gofmt) -w"
MODELS=MsgVpn,$\
MsgVpnQueue,$\
MsgVpnQueueSubscription,$\
MsgVpnClientUsername,$\
MsgVpnAclProfile,$\
MsgVpnAclProfileClientConnectException,$\
MsgVpnAclProfileSubscribeException,$\
MsgVpnAclProfilePublishException,$\
MsgVpnClientProfile,$\
MsgVpnAuthenticationOauthProfile,$\
ClientCertAuthority
format-examples:
terraform fmt -recursive ./examples/
generate-docs:
go get github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
openapi: sempv2-config.json
rm -rf sempv2
openapi-generator generate \
-g go \
-i sempv2-config.json \
--skip-validate-spec \
--output sempv2 \
--package-name sempv2 \
-p hideGenerationTimestamp=true \
-p structPrefix=true \
-p isGoSubmodule=true
rm -rf sempv2/go.mod sempv2/go.sum sempv2/git_push.sh sempv2/docs
release:
GITHUB_TOKEN=$(GITHUB_TOKEN) \
GPG_FINGERPRINT=$(GPG_FINGERPRINT) \
goreleaser release --rm-dist
openapi-provider-generator:
mvn -f provider-generator/pom.xml clean compile
generate-provider: openapi-provider-generator
GO_POST_PROCESS_FILE=$(GO_POST_PROCESS_FILE) \
java -cp "provider-generator/target/classes:$(OPENAPI_GENERATOR_JAR)" \
-Dmodels=$(MODELS) \
org.openapitools.codegen.OpenAPIGenerator generate \
-g terraform-provider \
-i sempv2-config.json \
--skip-validate-spec \
--output $(PKG_NAME) \
--package-name $(PKG_NAME) \
--enable-post-process-file