From 165ec0294d8b73e2faabe2f19ed332e26e6f1842 Mon Sep 17 00:00:00 2001 From: Janki Chhatbar Date: Tue, 6 Jun 2023 10:48:49 +0530 Subject: [PATCH] Create sha256 checksums for all binaries Add a make target to create checksums for all subctl binaries created under dist/ directory. Add this new target to `build-cross` target so that the checksums are generated during the automated release process. Epic: https://github.com/submariner-io/enhancements/issues/182 Signed-off-by: Janki Chhatbar --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dd45a6204..6f6161041 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,7 @@ clean: build: $(BINARIES) -build-cross: $(CROSS_TARBALLS) +build-cross: $(CROSS_TARBALLS) create_checksums licensecheck: build | bin/lichen bin/lichen -c .lichen.yaml $(BINARIES) @@ -98,6 +98,9 @@ dist/subctl-%.tar.gz: cmd/bin/subctl-% mkdir -p dist tar -czf $@ --transform "s/^cmd.bin/subctl-$(VERSION)/" $< +create_checksums: $(CROSS_TARBALLS) + cd dist && sha256sum * >> subctl-checksums.txt + # Versions may include hyphens so it's easier to use $(VERSION) than to extract them from the target # Special case for Linux container builds