Skip to content

Commit 3719c2d

Browse files
committed
fixed release
1 parent e45d2be commit 3719c2d

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

bin/release.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,15 @@ for target in "${TARGETS[@]}"; do
7979
gh release download "$TAG" --pattern "inky-${target}.tar.gz" --dir "$TMPDIR"
8080
done
8181

82-
declare -A SHAS
83-
for target in "${TARGETS[@]}"; do
84-
SHAS[$target]=$(shasum -a 256 "$TMPDIR/inky-${target}.tar.gz" | awk '{print $1}')
85-
echo " $target: ${SHAS[$target]}"
86-
done
82+
SHA_AARCH64_APPLE=$(shasum -a 256 "$TMPDIR/inky-aarch64-apple-darwin.tar.gz" | awk '{print $1}')
83+
SHA_X86_64_APPLE=$(shasum -a 256 "$TMPDIR/inky-x86_64-apple-darwin.tar.gz" | awk '{print $1}')
84+
SHA_AARCH64_LINUX=$(shasum -a 256 "$TMPDIR/inky-aarch64-unknown-linux-gnu.tar.gz" | awk '{print $1}')
85+
SHA_X86_64_LINUX=$(shasum -a 256 "$TMPDIR/inky-x86_64-unknown-linux-gnu.tar.gz" | awk '{print $1}')
86+
87+
echo " aarch64-apple-darwin: $SHA_AARCH64_APPLE"
88+
echo " x86_64-apple-darwin: $SHA_X86_64_APPLE"
89+
echo " aarch64-unknown-linux-gnu: $SHA_AARCH64_LINUX"
90+
echo " x86_64-unknown-linux-gnu: $SHA_X86_64_LINUX"
8791

8892
# Update Homebrew tap
8993
TAP_DIR="$(cd "$(dirname "$0")"/../../homebrew-inky && pwd)"
@@ -102,20 +106,20 @@ class Inky < Formula
102106
on_macos do
103107
if Hardware::CPU.arm?
104108
url "https://github.com/foundation/inky/releases/download/${TAG}/inky-aarch64-apple-darwin.tar.gz"
105-
sha256 "${SHAS[aarch64-apple-darwin]}"
109+
sha256 "${SHA_AARCH64_APPLE}"
106110
else
107111
url "https://github.com/foundation/inky/releases/download/${TAG}/inky-x86_64-apple-darwin.tar.gz"
108-
sha256 "${SHAS[x86_64-apple-darwin]}"
112+
sha256 "${SHA_X86_64_APPLE}"
109113
end
110114
end
111115
112116
on_linux do
113117
if Hardware::CPU.arm?
114118
url "https://github.com/foundation/inky/releases/download/${TAG}/inky-aarch64-unknown-linux-gnu.tar.gz"
115-
sha256 "${SHAS[aarch64-unknown-linux-gnu]}"
119+
sha256 "${SHA_AARCH64_LINUX}"
116120
else
117121
url "https://github.com/foundation/inky/releases/download/${TAG}/inky-x86_64-unknown-linux-gnu.tar.gz"
118-
sha256 "${SHAS[x86_64-unknown-linux-gnu]}"
122+
sha256 "${SHA_X86_64_LINUX}"
119123
end
120124
end
121125

0 commit comments

Comments
 (0)