Skip to content

Commit e364f07

Browse files
authored
fix(install): choose file extension based upon running OS (#41)
Co-authored-by: Yegor Bayev <[email protected]>
1 parent 5948f44 commit e364f07

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

install.sh

+13-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,19 @@ fi
66

77
set -uo pipefail
88

9+
ARCHIVE_EXT='.tar.gz'
10+
911
case "${RUNNER_OS}" in
10-
macOS) OS=apple-darwin ;;
11-
Windows) OS=pc-windows-msvc ;;
12-
*) OS=unknown-linux-gnu ;;
12+
macOS)
13+
OS=apple-darwin
14+
;;
15+
Windows)
16+
OS=pc-windows-msvc
17+
ARCHIVE_EXT='.zip'
18+
;;
19+
*)
20+
OS=unknown-linux-gnu
21+
;;
1322
esac
1423
case "${RUNNER_ARCH}" in
1524
ARM64) ARCH=aarch64 ;;
@@ -40,7 +49,7 @@ else
4049
fi
4150

4251
TAG_NAME="$(echo "${RELEASE_INFO}" | jq --raw-output ".tag_name")"
43-
TARGET="git-cliff-${TAG_NAME:1}-${ARCH}-${OS}.tar.gz"
52+
TARGET="git-cliff-${TAG_NAME:1}-${ARCH}-${OS}${ARCHIVE_EXT}"
4453
LOCATION="$(echo "${RELEASE_INFO}" |
4554
jq --raw-output ".assets[].browser_download_url" |
4655
grep "${TARGET}$")"

0 commit comments

Comments
 (0)