feat: build script

This commit is contained in:
TaurusXin 2024-09-14 22:56:50 +08:00
parent e8314a95bf
commit ae04e22498
Signed by: taurusxin
GPG Key ID: C334DCA04AC2D2CC
2 changed files with 15 additions and 0 deletions

2
.gitignore vendored
View File

@ -12,6 +12,8 @@
*.so
*.dylib
ncmdump
# config files
config.yaml

13
build.sh Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Linux amd64
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ./build/ncmdump_linux_amd64 ncmdump
# macOS amd64
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-w -s" -o ./build/ncmdump_darwin_amd64 ncmdump
# macOS arm64
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="-w -s" -o ./build/ncmdump_darwin_arm64 ncmdump
# Windows amd64
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-w -s" -o ./build/ncmdump_windows_amd64.exe ncmdump