File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,17 @@ bundlespec:
45
45
46
46
src/generated/service/index.ts : $(shell find api -type f)
47
47
echo " Building service interface"
48
- $(eval BUNDLE_OUTPUT := $(shell mktemp -d) )
48
+ ifndef BUNDLE_OUTPUT
49
+ $(eval BUNDLE_OUTPUT := $(shell mktemp -d))
50
+ $(eval GENERATED_DIR := true)
51
+ endif
49
52
$(MAKE) bundlespec SERVICE_NAME=$(SERVICE_NAME) BUNDLE_OUTPUT=$(BUNDLE_OUTPUT)
50
53
yarn dlx openapi-typescript-express $(BUNDLE_OUTPUT)/openapi-spec.json \
51
54
--output ./src/generated/service/index.ts
52
55
yarn prettier ./src/generated/service/index.ts --write
53
- rm -rf $(TMP )
56
+ ifdef GENERATED_DIR
57
+ rm -rf $(BUNDLE_OUTPUT)
58
+ endif
54
59
55
60
# Config schema generation
56
61
CONFIG_TYPE_SRC ?= src/types/config.ts
You can’t perform that action at this time.
0 commit comments