diff --git a/Makefile b/Makefile index 18f87df..31b2384 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ KEY = host_key PORT = 2022 SRCS = %.go -VERSION := $(shell git describe --long --tags --dirty --always) +VERSION := $(shell git describe --tags --dirty --always) LDFLAGS = LDFLAGS="-X main.Version=$(VERSION)" all: $(BINARY) @@ -33,6 +33,6 @@ test: golint ./... release: - ENV=GOOS=linux GOARCH=amd64 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE - ENV=GOOS=linux GOARCH=386 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE - ENV=GOOS=darwin GOARCH=amd64 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE + GOOS=linux GOARCH=amd64 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE + GOOS=linux GOARCH=386 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE + GOOS=darwin GOARCH=amd64 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE diff --git a/build_release b/build_release index 2a0831c..00d4c35 100755 --- a/build_release +++ b/build_release @@ -16,12 +16,15 @@ main() { if [[ ! "$GOOS" ]]; then export GOOS="linux" + echo "Defaulting to GOOS=$GOOS" fi if [[ ! "$GOARCH" ]]; then export GOARCH="amd64" + echo "Defaulting to GOARCH=$GOARCH" fi if [[ ! "$BUILDDIR" ]]; then export BUILDDIR="build" + echo "Defaulting to BUILDDIR=$BUILDDIR" fi build "$@"