Skip to content

Commit 07ec6b3

Browse files
committed
add mac arm support
1 parent b4b7505 commit 07ec6b3

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

action/lib/utils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ class Utils {
182182
return 'windows-amd64';
183183
}
184184
if ((0, os_1.platform)().includes('darwin')) {
185+
if ((0, os_1.arch)().includes('arm')) {
186+
return (0, os_1.arch)().includes('64') ? 'mac-arm64' : 'mac-arm';
187+
}
185188
return 'mac-386';
186189
}
187190
if ((0, os_1.arch)().includes('arm')) {

action/src/utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ export class Utils {
152152
return 'windows-amd64';
153153
}
154154
if (platform().includes('darwin')) {
155+
if (arch().includes('arm')) {
156+
return arch().includes('64') ? 'mac-arm64' : 'mac-arm';
157+
}
155158
return 'mac-386';
156159
}
157160
if (arch().includes('arm')) {

buildscripts/getFrogbot.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,19 @@ setWindowsProperties() {
3131

3232
setMacProperties() {
3333
FROGBOT_OS="mac"
34-
URL="${PLATFORM_URL}/artifactory/${REMOTE_PATH}frogbot/v2/${VERSION}/frogbot-mac-386/frogbot"
34+
MACHINE_TYPE="$(uname -m)"
35+
case $MACHINE_TYPE in
36+
arm | armv7l)
37+
ARCH="arm"
38+
;;
39+
aarch64)
40+
ARCH="arm64"
41+
;;
42+
*)
43+
ARCH="386"
44+
;;
45+
esac
46+
URL="${PLATFORM_URL}/artifactory/${REMOTE_PATH}frogbot/v2/${VERSION}/frogbot-${FROGBOT_OS}-${ARCH}/frogbot"
3547
FILE_NAME="frogbot"
3648
}
3749

release/buildAndUpload.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ buildAndUpload 'frogbot-linux-arm' 'linux' 'arm' ''
6767
buildAndUpload 'frogbot-linux-ppc64' 'linux' 'ppc64' ''
6868
buildAndUpload 'frogbot-linux-ppc64le' 'linux' 'ppc64le' ''
6969
buildAndUpload 'frogbot-mac-386' 'darwin' 'amd64' ''
70+
buildAndUpload 'frogbot-mac-arm64' 'darwin' 'arm64' ''
71+
buildAndUpload 'frogbot-mac-arm' 'darwin' 'arm' ''
7072
buildAndUpload 'frogbot-windows-amd64' 'windows' 'amd64' '.exe'
7173

7274
jf rt u "./buildscripts/getFrogbot.sh" "$pkgPath/$version/" --flat

0 commit comments

Comments
 (0)