Post release cleanup

This commit is contained in:
Julian Ospald 2023-01-13 12:07:32 +08:00
parent 525e9672e8
commit 3f5a19c63e
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F
5 changed files with 35 additions and 45 deletions

View File

@ -70,7 +70,7 @@ binary=$(cabal list-bin ghcup)
binary_test=$(cabal list-bin ghcup-test) binary_test=$(cabal list-bin ghcup-test)
ver=$("${binary}" --numeric-version) ver=$("${binary}" --numeric-version)
strip_binary "${binary}" strip_binary "${binary}"
cp "${binary}" "out/${ARTIFACT}-${ver}" cp "${binary}" "out/${ARTIFACT}-${ver}${ext}"
cp "${binary_test}" "out/test-${ARTIFACT}-${ver}" cp "${binary_test}" "out/test-${ARTIFACT}-${ver}${ext}"
cp ./dist-newstyle/cache/plan.json "out/${ARTIFACT}.plan.json" cp ./dist-newstyle/cache/plan.json "out/${ARTIFACT}.plan.json"

View File

@ -28,7 +28,7 @@
plat="$(uname -s)" plat="$(uname -s)"
arch=$(uname -m) arch=$(uname -m)
ghver="0.1.18.0" ghver="0.1.19.0"
: "${GHCUP_BASE_URL:=https://downloads.haskell.org/~ghcup}" : "${GHCUP_BASE_URL:=https://downloads.haskell.org/~ghcup}"
export GHCUP_SKIP_UPDATE_CHECK=yes export GHCUP_SKIP_UPDATE_CHECK=yes

View File

@ -1,49 +1,34 @@
#!/bin/bash
set -eu set -eu
set -o pipefail
tag=v$1 shopt -s extglob
ver=$1
dest=$2 RELEASE=$1
gpg_user=$3 SIGNER=$2
mkdir -p "${dest}" echo "RELEASE: $RELEASE"
echo "SIGNER: $SIGNER"
cd "${dest}" for com in gh gpg curl sha256sum ; do
command -V ${com} >/dev/null 2>&1
done
base_url="https://gitlab.haskell.org/api/v4/projects/618/jobs/artifacts/${tag}/raw" [ ! -e "gh-release-artifacts/${RELEASE}" ]
curl -f -o "x86_64-apple-darwin-ghcup-${ver}" \ mkdir -p "gh-release-artifacts/${RELEASE}"
"${base_url}/out/x86_64-apple-darwin-ghcup-${ver}?job=release:darwin" cd "gh-release-artifacts/${RELEASE}"
curl -f -o "aarch64-apple-darwin-ghcup-${ver}" \ # github
"${base_url}/out/aarch64-apple-darwin-ghcup-${ver}?job=release:darwin:aarch64" gh release download $RELEASE
curl -f -o "x86_64-freebsd12-ghcup-${ver}" \ rm test-*
"${base_url}/out/x86_64-portbld-freebsd-ghcup-${ver}?job=release:freebsd12"
curl -f -o "x86_64-freebsd13-ghcup-${ver}" \
"${base_url}/out/x86_64-portbld-freebsd-ghcup-${ver}?job=release:freebsd13"
curl -f -o "i386-linux-ghcup-${ver}" \
"${base_url}/out/i386-linux-ghcup-${ver}?job=release:linux:32bit"
curl -f -o "x86_64-linux-ghcup-${ver}" \
"${base_url}/out/x86_64-linux-ghcup-${ver}?job=release:linux:64bit"
curl -f -o "aarch64-linux-ghcup-${ver}" \
"${base_url}/out/aarch64-linux-ghcup-${ver}?job=release:linux:aarch64"
curl -f -o "armv7-linux-ghcup-${ver}" \
"${base_url}/out/armv7-linux-ghcup-${ver}?job=release:linux:armv7"
curl -f -o "x86_64-mingw64-ghcup-${ver}.exe" \
"${base_url}/out/x86_64-mingw64-ghcup-${ver}.exe?job=release:windows"
rm -f *.sig
sha256sum *-ghcup-* > SHA256SUMS
gpg --detach-sign -u ${gpg_user} SHA256SUMS
for f in *-ghcup-* ; do gpg --detach-sign -u ${gpg_user} $f ; done
# 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}"
sha256sum *ghcup* > SHA256SUMS
gpg --detach-sign -u "${SIGNER}" SHA256SUMS

View File

@ -29,8 +29,7 @@ symlink ${ver}/aarch64-linux-ghcup-${ver} aarch64-linux-ghcup
symlink ${ver}/armv7-linux-ghcup-${ver} armv7-linux-ghcup symlink ${ver}/armv7-linux-ghcup-${ver} armv7-linux-ghcup
symlink ${ver}/i386-linux-ghcup-${ver} i386-linux-ghcup symlink ${ver}/i386-linux-ghcup-${ver} i386-linux-ghcup
symlink ${ver}/x86_64-apple-darwin-ghcup-${ver} x86_64-apple-darwin-ghcup symlink ${ver}/x86_64-apple-darwin-ghcup-${ver} x86_64-apple-darwin-ghcup
symlink ${ver}/x86_64-freebsd12-ghcup-${ver} x86_64-freebsd12-ghcup symlink ${ver}/x86_64-portbld-freebsd-ghcup-${ver} x86_64-portbld-freebsd-ghcup
symlink ${ver}/x86_64-freebsd13-ghcup-${ver} x86_64-freebsd13-ghcup
symlink ${ver}/x86_64-linux-ghcup-${ver} x86_64-linux-ghcup symlink ${ver}/x86_64-linux-ghcup-${ver} x86_64-linux-ghcup
symlink ${ver}/x86_64-mingw64-ghcup-${ver}.exe x86_64-mingw64-ghcup.exe symlink ${ver}/x86_64-mingw64-ghcup-${ver}.exe x86_64-mingw64-ghcup.exe
EOF EOF

View File

@ -25,22 +25,28 @@ put SHA256SUMS
put SHA256SUMS.sig put SHA256SUMS.sig
put aarch64-apple-darwin-ghcup-${ver} put aarch64-apple-darwin-ghcup-${ver}
put aarch64-apple-darwin-ghcup-${ver}.sig put aarch64-apple-darwin-ghcup-${ver}.sig
put aarch64-apple-darwin-ghcup.plan.json
put aarch64-linux-ghcup-${ver} put aarch64-linux-ghcup-${ver}
put aarch64-linux-ghcup-${ver}.sig put aarch64-linux-ghcup-${ver}.sig
put aarch64-linux-ghcup.plan.json
put armv7-linux-ghcup-${ver} put armv7-linux-ghcup-${ver}
put armv7-linux-ghcup-${ver}.sig put armv7-linux-ghcup-${ver}.sig
put armv7-linux-ghcup.plan.json
put i386-linux-ghcup-${ver} put i386-linux-ghcup-${ver}
put i386-linux-ghcup-${ver}.sig put i386-linux-ghcup-${ver}.sig
put i386-linux-ghcup.plan.json
put x86_64-apple-darwin-ghcup-${ver} put x86_64-apple-darwin-ghcup-${ver}
put x86_64-apple-darwin-ghcup-${ver}.sig put x86_64-apple-darwin-ghcup-${ver}.sig
put x86_64-freebsd12-ghcup-${ver} put x86_64-apple-darwin-ghcup.plan.json
put x86_64-freebsd12-ghcup-${ver}.sig put x86_64-portbld-freebsd-ghcup-${ver}
put x86_64-freebsd13-ghcup-${ver} put x86_64-portbld-freebsd-ghcup-${ver}.sig
put x86_64-freebsd13-ghcup-${ver}.sig put x86_64-portbld-freebsd-ghcup.plan.json
put x86_64-linux-ghcup-${ver} put x86_64-linux-ghcup-${ver}
put x86_64-linux-ghcup-${ver}.sig put x86_64-linux-ghcup-${ver}.sig
put x86_64-linux-ghcup.plan.json
put x86_64-mingw64-ghcup-${ver}.exe put x86_64-mingw64-ghcup-${ver}.exe
put x86_64-mingw64-ghcup-${ver}.exe.sig put x86_64-mingw64-ghcup-${ver}.exe.sig
put x86_64-mingw64-ghcup.plan.json
EOF EOF
curl -X PURGE https://downloads.haskell.org/~ghcup/${ver}/ curl -X PURGE https://downloads.haskell.org/~ghcup/${ver}/