signing/sign.sh: fix armoring

We use gpg --enarmor to convert the torcx manifest binary sigs to ascii
armored ones. Unfortunately --enarmor just wraps the binary blob without
realizing its a signature, which breaks torcx. Pipe the output through
sed to fix the header.
This commit is contained in:
Andrew Jeddeloh 2018-10-25 12:14:18 -07:00
parent e1634c48ea
commit 1d17d34314

View File

@ -56,7 +56,10 @@ fero-client \
--secret-key coreos-torcx \
${torcx_signature_arg}
gpg2 --enarmor \
--output "${DATA_DIR}/torcx_manifest.json.asc" \
"${DATA_DIR}/torcx_manifest.json.sig-fero"
--output - \
"${DATA_DIR}/torcx_manifest.json.sig-fero" \
| sed 's/ARMORED FILE/SIGNATURE/' \
> "${DATA_DIR}/torcx_manifest.json.asc"
echo "=== Torcx manifest signed successfully. ==="
rm -f "${DATA_DIR}/torcx_manifest.json.sig-fero"