From 571a79cc4861f654ac23b86e8f2ea148382535c9 Mon Sep 17 00:00:00 2001 From: mystique09 Date: Mon, 30 May 2022 15:53:28 +0800 Subject: [PATCH 1/2] add linux/arm64 platform --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 83e8666b..3f026c84 100755 --- a/install.sh +++ b/install.sh @@ -76,6 +76,7 @@ is_supported_platform() { darwin/arm64) found=0 ;; darwin/386) found=0 ;; linux/amd64) found=0 ;; + linux/arm64) found=0 ;; linux/386) found=0 ;; windows/amd64) found=0 ;; windows/386) found=0 ;; @@ -339,4 +340,4 @@ if [ "$OS" = "windows" ]; then BINARY="${BINARY}.exe" fi -execute \ No newline at end of file +execute From 314a6df64308c636c8412c21da61b6b3ca83b375 Mon Sep 17 00:00:00 2001 From: mystique09 Date: Mon, 30 May 2022 15:56:09 +0800 Subject: [PATCH 2/2] add linux/arm64 platform support, build script --- Makefile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ece393ca..2e749435 100644 --- a/Makefile +++ b/Makefile @@ -133,6 +133,22 @@ go.build.linux: @ tar -czf release/bud_v$(BUD_VERSION)_linux_amd64.tar.gz -C release bud_v$(BUD_VERSION)_linux_amd64 @ rm -rf release/bud_v$(BUD_VERSION)_linux_amd64 +go.build.linux.arm64: + @ xgo \ + --targets=linux/arm64 \ + --dest=release \ + --out=bud \ + --trimpath \ + --ldflags="-s -w \ + -X 'github.com/livebud/bud/internal/version.Bud=$(BUD_VERSION)' \ + " \ + ./ 1> /dev/null + @ mkdir -p release/bud_v$(BUD_VERSION)_linux_arm64 + @ mv release/bud-linux-arm64 release/bud_v$(BUD_VERSION)_linux_arm64/bud + @ cp {Changelog,License,Readme}.md release/bud_v$(BUD_VERSION)_linux_arm64 + @ tar -czf release/bud_v$(BUD_VERSION)_linux_arm64.tar.gz -C release bud_v$(BUD_VERSION)_linux_arm64 + @ rm -rf release/bud_v$(BUD_VERSION)_linux_arm64 + # v8go on Windows isn't supported at the moment. # You'll encounter: "/usr/bin/x86_64-w64-mingw32-ld: cannot find -lv8" # See: @@ -190,7 +206,8 @@ build: @ $(MAKE) --no-print-directory -j4 \ go.build.darwin.amd64 \ go.build.darwin.arm64 \ - go.build.linux + go.build.linux \ + go.build.linux.arm64 @ go run scripts/generate-checksums/main.go ##