Skip to content

Commit 131b900

Browse files
committed
OAS-4755 | Test sign fix
1 parent 17c39bf commit 131b900

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sign.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#!/bin/bash
2+
set -e
23

34
gpg-agent --daemon --default-cache-ttl 7200
4-
echo "$GPG_PRIVATE_KEY" | cat -e | sed 's/\$/\\n/g' | gpg --import --batch --no-tty
5+
# Multiline key in an envvar gets mangled.
6+
FIXED_KEY=$(echo "$GPG_PRIVATE_KEY" | cat -e | sed 's/\$/\\n/g')
7+
echo -e $FIXED_KEY | gpg --import --batch --no-tty
58
echo "hello world" > temp.txt
69
gpg --detach-sig --yes -v --output=/dev/null --pinentry-mode loopback --passphrase "${PASSPHRASE}" temp.txt
710
cd assets ; gpg --detach-sign ${PROJECT}-${VERSION}_SHA256SUMS

0 commit comments

Comments
 (0)