chore: rename binary

This commit is contained in:
TaurusXin 2024-09-16 13:27:40 +08:00
parent d396c91e90
commit 30a50c1eae
Signed by: taurusxin
GPG Key ID: C334DCA04AC2D2CC
1 changed files with 15 additions and 10 deletions

View File

@ -8,25 +8,30 @@ mkdir build
# Linux amd64
echo "Building for Linux amd64..."
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ./build/ncmdump_linux_amd64 github.com/taurusxin/ncmdump-go
tar zcf build/ncmdump_linux_amd64_$VERSION.tar.gz -C build ncmdump_linux_amd64
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o build/ncmdump github.com/taurusxin/ncmdump-go
tar zcf build/ncmdump_linux_amd64_$VERSION.tar.gz -C build ncmdump
rm build/ncmdump
# Linux arm64
echo "Building for Linux arm64..."
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-w -s" -o ./build/ncmdump_linux_arm64 github.com/taurusxin/ncmdump-go
tar zcf build/ncmdump_linux_arm64_$VERSION.tar.gz -C build ncmdump_linux_arm64
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-w -s" -o build/ncmdump github.com/taurusxin/ncmdump-go
tar zcf build/ncmdump_linux_arm64_$VERSION.tar.gz -C build ncmdump
rm build/ncmdump
# macOS amd64
echo "Building for macOS amd64..."
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-w -s" -o ./build/ncmdump_darwin_amd64 github.com/taurusxin/ncmdump-go
tar zcf build/ncmdump_darwin_amd64_$VERSION.tar.gz -C build ncmdump_darwin_amd64
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-w -s" -o build/ncmdump github.com/taurusxin/ncmdump-go
tar zcf build/ncmdump_darwin_amd64_$VERSION.tar.gz -C build ncmdump
rm build/ncmdump
# macOS arm64
echo "Building for macOS arm64..."
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="-w -s" -o ./build/ncmdump_darwin_arm64 github.com/taurusxin/ncmdump-go
tar zcf build/ncmdump_darwin_arm64_$VERSION.tar.gz -C build ncmdump_darwin_arm64
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="-w -s" -o build/ncmdump github.com/taurusxin/ncmdump-go
tar zcf build/ncmdump_darwin_arm64_$VERSION.tar.gz -C build ncmdump
rm build/ncmdump
# Windows amd64
echo "Building for Windows amd64..."
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-w -s" -o ./build/ncmdump_windows_amd64.exe github.com/taurusxin/ncmdump-go
zip -q -j build/ncmdump_windows_amd64_$VERSION.zip ./build/ncmdump_windows_amd64.exe
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-w -s" -o build/ncmdump.exe github.com/taurusxin/ncmdump-go
zip -q -j build/ncmdump_windows_amd64_$VERSION.zip ./build/ncmdump.exe
rm build/ncmdump.exe