-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (26 loc) · 789 Bytes
/
Makefile
File metadata and controls
31 lines (26 loc) · 789 Bytes
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
CODEGEN_VERSION=2.4.39
CODEGEN_JAR=swagger-codegen-cli-$(CODEGEN_VERSION).jar
swagger.yaml:
# We want to keep swagger.yaml in version control, so that we can see what changed.
curl -sSL https://core.hivelocity.net/api/v2/swagger.json | yq -P > swagger.yaml
.PHONY: client
client: $(CODEGEN_JAR) swagger.yaml
# Generate client
@rm -rf ./client
java -jar $(CODEGEN_JAR) generate \
-i swagger.yaml \
-l go \
-o ./client
go fmt ./...
go build github.com/hivelocity/hivelocity-client-go/client
go mod tidy
go mod vendor
go test ./...
$(CODEGEN_JAR):
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/$(CODEGEN_VERSION)/$(CODEGEN_JAR)
.PHONY: clean
clean:
@rm -rf client/
@rm -f swagger-codegen-cli*jar
generate-modules:
./hack/golang-modules-update.sh