From 077ea2d12de4d0f71919ff305075719b0ca6af83 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 3 Jun 2020 00:23:50 -0600 Subject: [PATCH] add build scripts for convenience --- build-mgmt.sh | 6 ++++++ build-relay.sh | 11 +++++++++++ build.sh | 1 + 3 files changed, 18 insertions(+) create mode 100644 build-mgmt.sh create mode 100644 build-relay.sh diff --git a/build-mgmt.sh b/build-mgmt.sh new file mode 100644 index 0000000..ab761ee --- /dev/null +++ b/build-mgmt.sh @@ -0,0 +1,6 @@ +go generate ./... + +CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -o mgmt-server-linux ./mgmt/cmd/mgmt/*.go +CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -mod vendor -o mgmt-server-macos ./mgmt/cmd/mgmt/*.go +CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -mod vendor -o mgmt-server-windows-debug.exe ./mgmt/cmd/mgmt/*.go +CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -mod vendor -ldflags "-H windowsgui" -o mgmt-server-windows.exe ./mgmt/cmd/mgmt/*.go diff --git a/build-relay.sh b/build-relay.sh new file mode 100644 index 0000000..170ab90 --- /dev/null +++ b/build-relay.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e +set -u + +go generate ./... + +CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -o telebit-relay-linux ./cmd/telebit-relay/*.go +CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -mod vendor -o telebit-relay-macos ./cmd/telebit-relay/*.go +CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -mod vendor -o telebit-relay-windows-debug.exe ./cmd/telebit-relay/*.go +CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -mod vendor -ldflags "-H windowsgui" -o telebit-relay-windows.exe ./cmd/telebit-relay/*.go diff --git a/build.sh b/build.sh index fb7fe95..5a557fb 100644 --- a/build.sh +++ b/build.sh @@ -8,6 +8,7 @@ set -u #CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -mod vendor -o telebit-relay-windows.exe ./cmd/telebit-relay/telebit-relay.go go generate ./... + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -o telebit-client-linux ./cmd/telebit/*.go CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -mod vendor -o telebit-client-macos ./cmd/telebit/*.go CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -mod vendor -o telebit-client-windows-debug.exe ./cmd/telebit/*.go