build: Avoid SSHing into a host during release checks

We really don't need to have SSH access if we're just checking for the
integrity of the next release. We can simply check if a specially
crafted file linking to the latest release is present.
This commit is contained in:
Emmanuele Bassi 2022-03-18 18:38:41 +00:00
parent 1e5a98b9cb
commit 8344dc1136

View file

@ -71,11 +71,11 @@ release-verify-even-micro:
release-verify-newer:
@echo -n "Checking that no $(VERSION) release already exists..."
@ssh $(RELEASE_UPLOAD_HOST) test ! -e $(RELEASE_UPLOAD_DIR)/$(tar_file) \
|| (echo "Ouch." && echo "Found: $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)/$(tar_file)" \
@if curl --head --fail --silent "$(RELEASE_URL_BASE)/LATEST-$(PACKAGE)-$(VERSION)" >/dev/null; then \
(echo "Ouch." && echo "Found: $(RELEASE_URL_BASE)/LATEST-$(PACKAGE)-$(VERSION)" \
&& echo "Are you sure you have an updated checkout?" \
&& echo "This should never happen." \
&& false)
&& false); else :; fi
@echo "Good."
release-remove-old: