Skip to content

Commit

Permalink
Support macOS and Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Feb 28, 2021
1 parent 495fa65 commit bc51888
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,23 @@ title="${title/\$tag/${tag}}"
title="${title/\$version/${version}}"

if [[ -n "${changelog}" ]]; then
case "${OSTYPE}" in
linux*)
target="x86_64-unknown-linux-musl"
;;
darwin*)
target="x86_64-apple-darwin"
;;
cygwin* | msys*)
target="x86_64-pc-windows-msvc"
;;
*)
error "unrecognized OSTYPE: ${OSTYPE}"
exit 1
;;
esac
# https://github.com/taiki-e/parse-changelog
curl -LsSf https://github.com/taiki-e/parse-changelog/releases/latest/download/parse-changelog-x86_64-unknown-linux-gnu.tar.gz | tar xzf -
curl -LsSf https://github.com/taiki-e/parse-changelog/releases/latest/download/parse-changelog-"${target}".tar.gz | tar xzf -
notes=$(./parse-changelog "${changelog}" "${version}")
rm -f ./parse-changelog
fi
Expand Down

0 comments on commit bc51888

Please sign in to comment.