mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-13 15:47:17 +03:00
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
|
||||
|
||||
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
|
||||
|
@ -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 "$@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user