优化编译脚本

This commit is contained in:
刘祥超
2024-01-22 18:51:22 +08:00
parent 32c1442878
commit 06bb61804b

View File

@@ -115,7 +115,11 @@ function build() {
fi fi
# building api node # building api node
env GOOS="$OS" GOARCH="$ARCH" go build -trimpath -tags $TAG --ldflags="-s -w" -o "$DIST"/bin/edge-api "$ROOT"/../cmd/edge-api/main.go env GOOS="$OS" GOARCH="$ARCH" go build -trimpath -tags $TAG --ldflags="-s -w" -o "$DIST/bin/$NAME" "$ROOT"/../cmd/edge-api/main.go
if [ ! -f "${DIST}/bin/${NAME}" ]; then
echo "build failed!"
exit
fi
# delete hidden files # delete hidden files
find "$DIST" -name ".DS_Store" -delete find "$DIST" -name ".DS_Store" -delete