tools: Read the correct default-key from gpgconf

Workflow error `gpg: using "4129A994AA7E9852" is thrown due to incorrect gpg parsing. Update the awk parsing logic to properly locate and extract the key fingerprint within the gpgconf --list-options output structure, ensuring automated signing uses the correct key.

Changelog-None.
This commit is contained in:
ShahanaFarooqui
2025-10-14 21:23:25 -07:00
committed by Rusty Russell
parent 8578d6cd1b
commit ea2f7607b8

View File

@@ -228,7 +228,7 @@ if [ -z "${TARGETS##* sign *}" ]; then
echo "Signing Release"
cd release/ || exit
sha256sum clightning-"$VERSION"* > SHA256SUMS-"$VERSION"
gpg -sb --armor -o SHA256SUMS-"$VERSION".asc "$(gpgconf --list-options gpg | awk -F: '$1 == "default-key" {print $10}' | tr -d '"')" SHA256SUMS-"$VERSION"
gpg -sb --armor --default-key "$(gpgconf --list-options gpg | awk -F: '$1 == "default-key" {print $10}' | tr -d '"')" -o SHA256SUMS-"$VERSION".asc SHA256SUMS-"$VERSION"
cd ..
echo "Release Signed"
fi