Skip to content

Commit

Permalink
fixup! generate_payload: handle the downloading of releases
Browse files Browse the repository at this point in the history
  • Loading branch information
tormath1 committed Jan 18, 2024
1 parent d0ee95c commit 702e78b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions generate_payload
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

set -e

if [ $# -ne 1 ]; then
if [ $# -lt 1 ]; then
echo "usage: $0 alpha:1786.0.0 beta:1781.2.0"
exit 1
fi

# DOWNLOAD can be set to 1 to download release artifacts automatically.
DOWNLOAD="${DOWNLOAD:-0}"

if [ -z "${PRIVATE_KEYS}" ]; then
echo "PRIVATE_KEYS must be set using the URI form (https://www.rfc-editor.org/rfc/rfc7512#section-2.3)"
echo "or using an absolute or relative path."
Expand Down Expand Up @@ -366,10 +369,12 @@ mkdir -p "${GNUPGHOME}"
chmod 700 "${GNUPGHOME}"
trap 'rm -rf ${GNUPGHOME}' EXIT

echo "Downloading files"
pushd ./data
./download_payloads "$@"
popd
if [ "${DOWNLOAD}" != 0 ]; then
echo "Downloading files"
pushd ./data
./download_payloads "$@"
popd
fi

# Setup GnuPG for verifying the image signature
gpg --batch --quiet --import <<< "${GPG_KEY}"
Expand Down

0 comments on commit 702e78b

Please sign in to comment.