From be8a165c1a592dd87d3fc11974c900595327f297 Mon Sep 17 00:00:00 2001 From: Maciej Barelkowski Date: Fri, 12 Apr 2024 10:13:08 +0200 Subject: [PATCH] feat: support both x64 and arm64 for MacOS Closes #10 --- lib/utils.bash | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/utils.bash b/lib/utils.bash index 193d32e..ad748d6 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -40,6 +40,7 @@ file_name() { case "$platform_name" in mac) + echo $(mac_file_name $version) echo "camunda-modeler-$version-mac.zip" ;; linux) @@ -51,6 +52,22 @@ file_name() { esac } +mac_file_name() { + local version="$1" + + case "$(arch)" in + arm64) + echo "camunda-modeler-$version-mac-arm64.zip" + ;; + x86_64) + echo "camunda-modeler-$version-mac-x64.zip" + ;; + *) + fail "Unknown architecture: $(arch)" + ;; + esac +} + executable() { local platform_name="$(platform)"