From 85884f86f315640ef8afe87ecf2240ab1c1bf721 Mon Sep 17 00:00:00 2001 From: yzewei Date: Fri, 12 Jan 2024 14:18:42 +0800 Subject: [PATCH 1/2] Add loong64 support Signed-off-by: yzewei --- Makefile | 4 +++- pkg/package-format/appimage/appImage.go | 2 +- scripts/build.sh | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c0ca08e..58859fd 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,8 @@ else ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_M),riscv64) OS_ARCH := linux_riscv64 + else ifeq ($(UNAME_M),loongarch64) + OS_ARCH := linux_loong64 else OS_ARCH := linux_amd64 endif @@ -51,4 +53,4 @@ publish: update-deps: go get -u -d - go mod tidy \ No newline at end of file + go mod tidy diff --git a/pkg/package-format/appimage/appImage.go b/pkg/package-format/appimage/appImage.go index 52eb53f..53d300b 100644 --- a/pkg/package-format/appimage/appImage.go +++ b/pkg/package-format/appimage/appImage.go @@ -38,7 +38,7 @@ func ConfigureCommand(app *kingpin.Application) { appDir: command.Flag("app", "The app dir.").Short('a').Required().String(), stageDir: command.Flag("stage", "The stage dir.").Short('s').Required().String(), output: command.Flag("output", "The output file.").Short('o').Required().String(), - arch: command.Flag("arch", "The arch.").Default("x64").Enum("x64", "ia32", "armv7l", "arm64", "riscv64"), + arch: command.Flag("arch", "The arch.").Default("x64").Enum("x64", "ia32", "armv7l", "arm64", "riscv64", "loong64"), template: command.Flag("template", "The template file.").String(), license: command.Flag("license", "The license file.").String(), diff --git a/scripts/build.sh b/scripts/build.sh index b1305b4..582509b 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -27,6 +27,9 @@ GOOS=linux GOARCH=arm go build -ldflags='-s -w' -o linux/arm/app-builder .. mkdir -p linux/arm64 GOOS=linux GOARCH=arm64 go build -ldflags='-s -w' -o linux/arm64/app-builder .. +mkdir -p linux/loong64 +GOOS=linux GOARCH=loong64 go build -ldflags='-s -w' -o linux/loong64/app-builder .. + mkdir -p win/ia32 # $env:GOARCH='386'; go build -o win/ia32/app-builder.exe .. GOOS=windows GOARCH=386 go build -o win/ia32/app-builder.exe .. @@ -37,4 +40,4 @@ GOOS=windows GOARCH=amd64 go build -o win/x64/app-builder.exe .. mkdir -p win/arm64 # $env:GOARCH='arm64'; go build -o win/arm64/app-builder.exe .. -GOOS=windows GOARCH=arm64 go build -o win/arm64/app-builder.exe .. \ No newline at end of file +GOOS=windows GOARCH=arm64 go build -o win/arm64/app-builder.exe .. From 3ed22df75fcff132a5b794ce1a421bec263bc118 Mon Sep 17 00:00:00 2001 From: Michael Maietta Date: Thu, 14 Mar 2024 09:07:26 -0700 Subject: [PATCH 2/2] adding changeset --- .changeset/tasty-humans-clean.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tasty-humans-clean.md diff --git a/.changeset/tasty-humans-clean.md b/.changeset/tasty-humans-clean.md new file mode 100644 index 0000000..00b2481 --- /dev/null +++ b/.changeset/tasty-humans-clean.md @@ -0,0 +1,5 @@ +--- +"app-builder-bin": minor +--- + +feat: Add loongarch64 support