restore file based sign/verify commands

This commit is contained in:
Lance Vick 2023-02-13 04:00:33 -08:00
parent 585e2432e2
commit a37d0d9cd6
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 24 additions and 0 deletions

View File

@ -17,6 +17,30 @@ clean: toolchain
") ")
$(MAKE) toolchain-clean $(MAKE) toolchain-clean
.PHONY: sign
sign:
set -e; \
git config --get user.signingkey 2>&1 >/dev/null || { \
echo "Error: git user.signingkey is not defined"; \
exit 1; \
}; \
fingerprint=$$(\
git config --get user.signingkey \
| sed 's/.*\([A-Z0-9]\{16\}\).*/\1/g' \
); \
gpg --armor \
--detach-sig \
--output $(RELEASE_DIR)/manifest.$${fingerprint}.asc \
$(RELEASE_DIR)/manifest.txt
.PHONY: verify
verify: | $(RELEASE_DIR)/manifest.txt
set -e; \
for file in $(RELEASE_DIR)/manifest.*.asc; do \
echo "\nVerifying: $${file}\n"; \
gpg --verify $${file} $(RELEASE_DIR)/manifest.txt; \
done;
.PHONY: mrproper .PHONY: mrproper
mrproper: mrproper:
docker image rm -f $(IMAGE) docker image rm -f $(IMAGE)