Skip to content

Commit

Permalink
Added support for darwin_arm64 and linux_arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
s0nerik committed Feb 15, 2021
1 parent 9a48869 commit 41f8472
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rm -rf .tmp
gox -output=".tmp/{{.OS}}_{{.Arch}}" -os="darwin linux windows" -arch="amd64"
gox -output=".tmp/{{.OS}}_{{.Arch}}" -os="darwin linux windows" -arch="amd64 arm64"

cd .tmp

Expand All @@ -13,15 +13,30 @@ if [ -x "\$(command -v goloc)" ]; then
goloc "\$@"
exit 0
else
EXECUTABLE=""
case "\$OSTYPE" in
darwin*) EXECUTABLE="darwin_amd64" ;;
linux*) EXECUTABLE="linux_amd64" ;;
msys*) EXECUTABLE="windows_amd64.exe" ;;
darwin*) EXECUTABLE+="darwin_" ;;
linux*) EXECUTABLE+="linux_" ;;
msys*) EXECUTABLE+="windows_" ;;
*)
echo "Platform is not supported: \$OSTYPE"
exit 1
;;
esac
MACHINE_TYPE=\$(uname -m)
case "\$MACHINE_TYPE" in
arm64*) EXECUTABLE+="arm64" ;;
x86_64*) EXECUTABLE+="amd64" ;;
*)
echo "CPU Architecture is not supported: \$MACHINE_TYPE"
exit 1
;;
esac
case "\$OSTYPE" in
msys*) EXECUTABLE+=".exe"";;
esac
echo "Using goloc from project..."
echo "Version:"
Expand Down

0 comments on commit 41f8472

Please sign in to comment.