-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (29 loc) · 855 Bytes
/
Makefile
File metadata and controls
38 lines (29 loc) · 855 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
32
33
34
35
36
37
38
OPENAPI_DIR = ./pkg/api/openapi_client
format:
go fmt ./...
lint:
golangci-lint run
test:
go test ./...
build:
cd cmd/cs && go build
mv cmd/cs/cs .
install:
cd cmd/cs && go install
generate-client:
rm -rf ${OPENAPI_DIR}
openapi-generator-cli generate -g go -o ${OPENAPI_DIR} -i https://codesphere.com/api/docs \
--additional-properties=isGoSubmodule=true,withGoMod=false,packageName=openapi_client \
--skip-validate-spec # TODO: remove once the Codesphere openapi spec is fixed
# Remove all non-go files
rm -r \
${OPENAPI_DIR}/.gitignore \
${OPENAPI_DIR}/.openapi-generator/FILES \
${OPENAPI_DIR}/.openapi-generator-ignore \
${OPENAPI_DIR}/.travis.yml \
${OPENAPI_DIR}/api \
${OPENAPI_DIR}/docs \
${OPENAPI_DIR}/git_push.sh \
${OPENAPI_DIR}/README.md \
${OPENAPI_DIR}/test
generate: generate-client format