Skip to content

Commit 08299ea

Browse files
committed
CCM-12896: Fix make build command
1 parent ade615d commit 08299ea

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/cloudevents/domains/common.mk

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,20 +128,22 @@ publish-json:
128128
cd $(CLOUD_EVENTS_DIR) && npm run build -- --root-dir $(ROOT_DIR) $(SRC_DIR)/events/$$schema.schema.yaml $(SCHEMAS_DIR)/events $(SCHEMA_BASE_URL) || exit 1; \
129129
fi; \
130130
done; \
131-
echo "Bundling published event schemas...";
132-
for schema in $(EVENT_NAMES); do \
133-
echo " - $$schema (bundle)"; \
134-
cd $(CLOUD_EVENTS_DIR) && npm run bundle -- --root-dir $(ROOT_DIR) --base-url $(SCHEMA_BASE_URL) $(OUTPUT_DIR)/events/$$schema.schema.json $(SCHEMAS_DIR)/events/$$schema.bundle.schema.json || exit 1; \
135-
done; \
136-
$(MAKE) publish-bundled-json \
131+
echo "Bundling published event schemas..."; \
132+
for schema in $(EVENT_NAMES); do \
133+
echo " - $$schema (bundle)"; \
134+
cd $(CLOUD_EVENTS_DIR) && npm run bundle -- --root-dir $(ROOT_DIR) --base-url $(SCHEMA_BASE_URL) $(OUTPUT_DIR)/events/$$schema.schema.json $(SCHEMAS_DIR)/events/$$schema.bundle.schema.json || exit 1; \
135+
done; \
137136
fi
137+
$(MAKE) publish-bundled-json
138138

139139
publish-bundled-json:
140-
echo "Flattening published event schemas...";
141-
for schema in $(EVENT_NAMES); do \
142-
echo " - $$schema (flatten)"; \
143-
cd $(CLOUD_EVENTS_DIR) && npm run bundle -- --flatten --root-dir $(ROOT_DIR) --base-url $(SCHEMA_BASE_URL) $(OUTPUT_DIR)/events/$$schema.schema.json $(SCHEMAS_DIR)/events/$$schema.flattened.schema.json || exit 1; \
144-
done;
140+
@if [ -n "$(EVENT_NAMES)" ]; then \
141+
@echo "Flattening published event schemas..."; \
142+
for schema in $(EVENT_NAMES); do \
143+
echo " - $$schema (flatten)"; \
144+
cd $(CLOUD_EVENTS_DIR) && npm run bundle -- --flatten --root-dir $(ROOT_DIR) --base-url $(SCHEMA_BASE_URL) $(OUTPUT_DIR)/events/$$schema.schema.json $(SCHEMAS_DIR)/events/$$schema.flattened.schema.json || exit 1; \
145+
done; \
146+
fi
145147

146148
publish-yaml:
147149
@echo "Publishing $(DOMAIN) YAML schemas alongside JSON..."

0 commit comments

Comments
 (0)