@@ -4,7 +4,7 @@ set -eu
|
||||
here=$(cd "$(dirname "$0")" && pwd)
|
||||
out=${1:-./dist}
|
||||
version=${VERSION:-$(git -C "$here" describe --tags --always --dirty 2>/dev/null || echo dev)}
|
||||
targets="linux/amd64 linux/arm64 darwin/arm64 darwin/amd64 windows/amd64"
|
||||
targets="linux/amd64 linux/arm64 linux/386 linux/arm darwin/arm64 darwin/amd64 windows/amd64 windows/386"
|
||||
|
||||
mkdir -p "$out"
|
||||
out=$(cd "$out" && pwd)
|
||||
@@ -32,7 +32,7 @@ for target in $targets; do
|
||||
if [ "$goos" = "windows" ]; then
|
||||
name="$name.exe"
|
||||
fi
|
||||
(cd "$here" && CGO_ENABLED=0 GOOS="$goos" GOARCH="$goarch" go build -trimpath -ldflags "-s -w -X main.Version=$version" -o "$out/$name" .)
|
||||
(cd "$here" && CGO_ENABLED=0 GOOS="$goos" GOARCH="$goarch" GOARM=7 go build -trimpath -ldflags "-s -w -X main.Version=$version" -o "$out/$name" .)
|
||||
if [ "$first" -eq 0 ]; then
|
||||
printf ',\n' >>"$manifest"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user