From 8344dc1136dbf018d1237ba60420e3ea18909c75 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 18 Mar 2022 18:38:41 +0000 Subject: [PATCH] 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. --- build/Makefile.am.releasing | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/Makefile.am.releasing b/build/Makefile.am.releasing index c8fd01a13..e985e983c 100644 --- a/build/Makefile.am.releasing +++ b/build/Makefile.am.releasing @@ -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: