chore: setup project and scripts
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
export GOTOOLCHAIN=local
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
||||
go env -w GOPROXY=https://goproxy.cn,direct
|
||||
go env -w GOSUMDB=off
|
||||
mkdir -p dist
|
||||
|
||||
echo "Building macOS arm64..."
|
||||
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags="-s -w" -o dist/juku_darwin_arm64 .
|
||||
|
||||
echo "Building macOS amd64..."
|
||||
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o dist/juku_darwin_amd64 .
|
||||
|
||||
echo "Building Linux amd64..."
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o dist/juku_linux_amd64 .
|
||||
|
||||
echo "Building Windows amd64..."
|
||||
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o dist/juku_windows_amd64.exe .
|
||||
|
||||
echo "Done. Files are in dist/."
|
||||
Reference in New Issue
Block a user