build: avoid re-downloading codegen binary
PROJECT_ROOT := "../.."
+CODEGEN_BIN := swagger-codegen-cli-2.4.14.jar
.PHONY: all
all: get-deps build
+deps/${CODEGEN_BIN}:
+ mkdir -p deps
+ curl https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.14/${CODEGEN_BIN} \
+ -o deps/${CODEGEN_BIN}
.PHONY: get-deps-swagger
-get-deps-swagger:
- mkdir -p deps
- curl https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.14/swagger-codegen-cli-2.4.14.jar \
- -o deps/swagger-codegen-cli.jar
+get-deps-swagger: deps/${CODEGEN_BIN}
.PHONY: get-deps-package
get-deps-package:
@@ -17,7 +19,7 @@ get-deps-package:
.PHONY: build-swagger
build-swagger:
mkdir -p src
- java -jar deps/swagger-codegen-cli.jar generate -i \
+ java -jar deps/${CODEGEN_BIN} generate -i \
${PROJECT_ROOT}/proto/build/swagger/determined/api/v1/api.swagger.json \
-l typescript-fetch -o src/
