2023-01-13 04:07:32 +00:00
|
|
|
#!/bin/bash
|
2022-02-26 17:06:41 +00:00
|
|
|
|
|
|
|
set -eu
|
2023-01-13 04:07:32 +00:00
|
|
|
set -o pipefail
|
2022-02-26 17:06:41 +00:00
|
|
|
|
2023-01-13 04:07:32 +00:00
|
|
|
shopt -s extglob
|
2022-02-26 17:06:41 +00:00
|
|
|
|
2023-01-13 04:07:32 +00:00
|
|
|
RELEASE=$1
|
|
|
|
SIGNER=$2
|
2022-02-26 17:06:41 +00:00
|
|
|
|
2023-01-13 04:07:32 +00:00
|
|
|
echo "RELEASE: $RELEASE"
|
|
|
|
echo "SIGNER: $SIGNER"
|
2022-02-26 17:06:41 +00:00
|
|
|
|
2023-01-13 04:07:32 +00:00
|
|
|
for com in gh gpg curl sha256sum ; do
|
|
|
|
command -V ${com} >/dev/null 2>&1
|
|
|
|
done
|
2022-02-26 17:06:41 +00:00
|
|
|
|
2023-01-13 04:07:32 +00:00
|
|
|
[ ! -e "gh-release-artifacts/${RELEASE}" ]
|
2022-02-26 17:06:41 +00:00
|
|
|
|
2023-01-13 04:07:32 +00:00
|
|
|
mkdir -p "gh-release-artifacts/${RELEASE}"
|
|
|
|
cd "gh-release-artifacts/${RELEASE}"
|
2022-02-26 17:06:41 +00:00
|
|
|
|
2023-01-13 04:07:32 +00:00
|
|
|
# github
|
|
|
|
gh release download $RELEASE
|
2022-02-26 17:06:41 +00:00
|
|
|
|
2023-01-13 04:07:32 +00:00
|
|
|
rm test-*
|
2022-02-26 17:06:41 +00:00
|
|
|
|
2023-01-13 04:07:32 +00:00
|
|
|
# cirrus
|
|
|
|
curl -L -o x86_64-portbld-freebsd-ghcup-${RELEASE} \
|
|
|
|
"https://api.cirrus-ci.com/v1/artifact/github/haskell/ghcup-hs/build/binaries/out/x86_64-portbld-freebsd-ghcup-${RELEASE}?branch=${RELEASE}"
|
2022-02-26 17:06:41 +00:00
|
|
|
|
2023-01-13 04:07:32 +00:00
|
|
|
sha256sum *ghcup* > SHA256SUMS
|
|
|
|
gpg --detach-sign -u "${SIGNER}" SHA256SUMS
|
2022-02-26 17:06:41 +00:00
|
|
|
|