Fix release script
This commit is contained in:
parent
ace2bc5124
commit
773e3c8cd9
8
Makefile
8
Makefile
|
@ -3,7 +3,7 @@ KEY = host_key
|
||||||
PORT = 2022
|
PORT = 2022
|
||||||
|
|
||||||
SRCS = %.go
|
SRCS = %.go
|
||||||
VERSION := $(shell git describe --long --tags --dirty --always)
|
VERSION := $(shell git describe --tags --dirty --always)
|
||||||
LDFLAGS = LDFLAGS="-X main.Version=$(VERSION)"
|
LDFLAGS = LDFLAGS="-X main.Version=$(VERSION)"
|
||||||
|
|
||||||
all: $(BINARY)
|
all: $(BINARY)
|
||||||
|
@ -33,6 +33,6 @@ test:
|
||||||
golint ./...
|
golint ./...
|
||||||
|
|
||||||
release:
|
release:
|
||||||
ENV=GOOS=linux 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
|
||||||
ENV=GOOS=linux GOARCH=386 $(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
|
||||||
ENV=GOOS=darwin GOARCH=amd64 $(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
|
||||||
|
|
|
@ -16,12 +16,15 @@ main() {
|
||||||
|
|
||||||
if [[ ! "$GOOS" ]]; then
|
if [[ ! "$GOOS" ]]; then
|
||||||
export GOOS="linux"
|
export GOOS="linux"
|
||||||
|
echo "Defaulting to GOOS=$GOOS"
|
||||||
fi
|
fi
|
||||||
if [[ ! "$GOARCH" ]]; then
|
if [[ ! "$GOARCH" ]]; then
|
||||||
export GOARCH="amd64"
|
export GOARCH="amd64"
|
||||||
|
echo "Defaulting to GOARCH=$GOARCH"
|
||||||
fi
|
fi
|
||||||
if [[ ! "$BUILDDIR" ]]; then
|
if [[ ! "$BUILDDIR" ]]; then
|
||||||
export BUILDDIR="build"
|
export BUILDDIR="build"
|
||||||
|
echo "Defaulting to BUILDDIR=$BUILDDIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build "$@"
|
build "$@"
|
||||||
|
|
Loading…
Reference in New Issue