first commit
This commit is contained in:
commit
fccfe2a4c8
26 files changed
+1819
No files matched your search
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
TARGET_OS="${TARGET_OS:-linux}"
|
||||
TARGET_ARCH="${TARGET_ARCH:-amd64}"
|
||||
OUT_DIR="${OUT_DIR:-dist}"
|
||||
NAME="ts3monolith-${TARGET_OS}-${TARGET_ARCH}"
|
||||
|
||||
rm -rf "$OUT_DIR"
|
||||
mkdir -p "$OUT_DIR"
|
||||
|
||||
go test ./...
|
||||
CGO_ENABLED=0 GOOS="$TARGET_OS" GOARCH="$TARGET_ARCH" go build -trimpath -ldflags="-s -w -buildid=" -o "$OUT_DIR/$NAME" ./cmd/ts3monolith
|
||||
chmod 0755 "$OUT_DIR/$NAME"
|
||||
|
||||
if command -v sha256sum >/dev/null 2>&1; then
|
||||
(cd "$OUT_DIR" && sha256sum "$NAME" > "$NAME.sha256")
|
||||
elif command -v shasum >/dev/null 2>&1; then
|
||||
(cd "$OUT_DIR" && shasum -a 256 "$NAME" > "$NAME.sha256")
|
||||
fi
|
||||
|
||||
printf '%s\n' "$OUT_DIR/$NAME"
|
||||
Reference in new issue
Block a user