From bba6c1d8736573eb0526c4d27d9a4f9cd634c66e Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sat, 8 Feb 2025 22:09:18 +0100 Subject: Optionally use file to allow local signing --- Makefile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f4773d2..b21e164 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,9 @@ deploy_host := deploy@conchos.unlimited.pizza deploy_path := /srv/http/build.r.bdr.sh/$(app_name) define sign_and_deploy - sha256sum $(1) > $(1).sha256 - echo "$MINISIGN_PASSWORD" | minisign -Sm $(1) - rsync -avz $(1) $(DEPLOY_HOST):$(DEPLOY_PATH) - rsync -avz $(1).minisig $(DEPLOY_HOST):$(DEPLOY_PATH) + @./scripts/sign.sh "$(1)" "$(channel)" "$(architecture)" + rsync -avz $(1) $(deploy_host):$(deploy_path) + rsync -avz $(1).minisig $(deploy_host):$(deploy_path) endef default: build @@ -50,7 +49,7 @@ ifeq ($(findstring linux,$(target)),linux) @$(eval filename := $(app_name)-$(target)-$(channel)) cargo deb --profile $(profile) --target $(target) mv target/$(target)/debian/*.deb $(filename).deb - @$(call checksum_and_deploy,$(filename).deb) + @$(call sign_and_deploy,$(filename).deb) endif rpm: build @@ -58,13 +57,13 @@ ifeq ($(findstring linux,$(target)),linux) @$(eval filename := $(app_name)-$(target)-$(channel)) cargo generate-rpm --profile $(profile) --target $(target) mv target/$(target)/generate-rpm/*.rpm $(filename).rpm - @$(call checksum_and_deploy,$(filename).rpm) + @$(call sign_and_deploy,$(filename).rpm) endif tar: build @$(eval filename := $(app_name)-$(target)-$(channel)) tar -czvf $(filename).tar.gz -C target/$(target)/$(profile)/ $(app_name) - @$(call checksum_and_deploy,$(filename).tar.gz) + @$(call sign_and_deploy,$(filename).tar.gz) package: $(architectures) -- cgit