实现单体实例安装工具

This commit is contained in:
GoEdgeLab
2024-01-29 17:57:01 +08:00
parent 12fd8b80b0
commit d6ff39966b
12 changed files with 1333 additions and 18 deletions

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
OS="${1}"
ARCH="${2}"
TAG="${3}"
if [ -z "$OS" ]; then
echo "usage: build.sh OS ARCH"
exit
fi
if [ -z "$ARCH" ]; then
echo "usage: build.sh OS ARCH"
exit
fi
env GOOS=linux GOARCH="${ARCH}" go build -tags="${TAG}" -trimpath -ldflags="-s -w" -o "standalone-instance-installer-${OS}-${ARCH}" main.go