Merge pull request #47569 from thaJeztah/make_fix_empty_check

Makefile: generate-files: fix check for empty TMP_OUT
This commit is contained in:
Bjorn Neergaard 2024-03-15 12:07:00 -06:00 committed by GitHub
commit 1f539a6e85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -255,9 +255,10 @@ swagger-docs: ## preview the API documentation
.PHONY: generate-files
generate-files:
$(eval $@_TMP_OUT := $(shell mktemp -d -t moby-output.XXXXXXXXXX))
ifeq ($($@_TMP_OUT),)
$(error Could not create temp directory.)
endif
@if [ -z "$($@_TMP_OUT)" ]; then \
echo "Temp dir is not set"; \
exit 1; \
fi
$(BUILD_CMD) --target "update" \
--output "type=local,dest=$($@_TMP_OUT)" \
--file "./hack/dockerfiles/generate-files.Dockerfile" .