Skip to content

Commit

Permalink
Add build for darwin arm64 and adjust get accordingly
Browse files Browse the repository at this point in the history
Signed-off-by: Czékus Máté <[email protected]>
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
Shikachuu authored and alexellis committed Aug 26, 2022
1 parent ab154f7 commit 0c77d99
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ dist:
mkdir -p bin/
rm -rf bin/k3sup*
CGO_ENABLED=0 GOOS=linux go build -a -ldflags $(LDFLAGS) -installsuffix cgo -o bin/k3sup
CGO_ENABLED=0 GOOS=darwin go build -a -ldflags $(LDFLAGS) -installsuffix cgo -o bin/k3sup-darwin
GOARM=7 GOARCH=arm CGO_ENABLED=0 GOOS=linux go build -a -ldflags $(LDFLAGS) -installsuffix cgo -o bin/k3sup-armhf
GOARCH=arm64 CGO_ENABLED=0 GOOS=linux go build -a -ldflags $(LDFLAGS) -installsuffix cgo -o bin/k3sup-arm64
CGO_ENABLED=0 GOOS=darwin go build -a -ldflags $(LDFLAGS) -installsuffix cgo -o bin/k3sup-darwin
GOARCH=arm64 CGO_ENABLED=0 GOOS=darwin go build -a -ldflags $(LDFLAGS) -installsuffix cgo -o bin/k3sup-darwin-arm64
GOOS=windows CGO_ENABLED=0 go build -a -ldflags $(LDFLAGS) -installsuffix cgo -o bin/k3sup.exe

.PHONY: hash
Expand Down
13 changes: 12 additions & 1 deletion get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,18 @@ getPackage() {
suffix=""
case $uname in
"Darwin")
suffix="-darwin"
arch=$(uname -m)
echo $arch
case $arch in
"x86_64")
suffix="-darwin"
;;
esac
case $arch in
"arm64")
suffix="-darwin-arm64"
;;
esac
;;
"MINGW"*)
suffix=".exe"
Expand Down

0 comments on commit 0c77d99

Please sign in to comment.