Skip to content

Commit

Permalink
Add support on M1 for SDKMAN
Browse files Browse the repository at this point in the history
  • Loading branch information
wleczny committed Oct 25, 2022
1 parent e06271b commit 36cf139
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .github/scripts/generate-os-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ generate_sdk() {
sdkDirectory="scala-cli-x86_64-pc-linux-static-sdk"
binName="scala-cli"
elif [[ "$OSTYPE" == "darwin"* ]]; then
sdkDirectory="scala-cli-x86_64-apple-darwin-sdk"
if [[ "$(uname -m)" == "arm" ]]; then
sdkDirectory="scala-cli-aarch64-apple-darwin-sdk"
else
sdkDirectory="scala-cli-x86_64-apple-darwin-sdk"
fi
binName="scala-cli"
elif [[ "$OSTYPE" == "msys" ]]; then
sdkDirectory="scala-cli-x86_64-pc-win32-sdk"
Expand Down Expand Up @@ -137,8 +141,8 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
generate_pkg "aarch64"
else
generate_pkg "x86_64"
generate_sdk
fi
generate_sdk
elif [[ "$OSTYPE" == "msys" ]]; then
generate_msi
generate_sdk
Expand Down
7 changes: 4 additions & 3 deletions .github/scripts/publish-sdkman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ version() {
}

SCALA_CLI_VERSION="$(version)"
UNAMES=("pc-linux-static-sdk" "apple-darwin-sdk" "pc-win32-sdk")
PLATFORMS=("LINUX_64" "MAC_OSX" "WINDOWS_64")
ARCHS=("x86_64" "x86_64" "aarch64" "x86_64")
UNAMES=("pc-linux-static-sdk" "apple-darwin-sdk" "apple-darwin-sdk" "pc-win32-sdk")
PLATFORMS=("LINUX_64" "MAC_OSX" "MAC_ARM64" "WINDOWS_64")

for i in "${!PLATFORMS[@]}"; do

SCALA_CLI_URL="https://github.com/VirtuslabRnD/scala-cli/releases/download/v$SCALA_CLI_VERSION/scala-cli-x86_64-${UNAMES[i]}.zip"
SCALA_CLI_URL="https://github.com/VirtuslabRnD/scala-cli/releases/download/v$SCALA_CLI_VERSION/scala-cli-${ARCHS[i]}-${UNAMES[i]}.zip"

# Release a new Candidate Version
curl --silent --show-error --fail \
Expand Down

0 comments on commit 36cf139

Please sign in to comment.