make binary name .exe for windows

This commit is contained in:
Cory Bennett
2016-06-29 01:26:28 +01:00
parent 4f91cecf25
commit 68b5e60dd9
+4 -2
View File
@@ -13,14 +13,18 @@ PLATFORMS= \
darwin-amd64 \
$(NULL)
NAME=jira
OS=$(shell uname -s)
ifeq ($(filter CYGWIN%,$(OS)),$(OS))
export CWD=$(shell cygpath -wa .)
export SEP=\\
export CYGWIN=winsymlinks:native
BIN ?= $(GOBIN)$(SEP)$(NAME).exe
else
export CWD=$(shell pwd)
export SEP=/
BIN ?= $(GOBIN)$(SEP)$(NAME)
endif
export GOPATH=$(CWD)
@@ -28,9 +32,7 @@ export GOPATH=$(CWD)
DIST=$(CWD)$(SEP)dist
GOBIN ?= $(CWD)
NAME=jira
BIN ?= $(GOBIN)$(SEP)$(NAME)
CURVER ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags || grep ^\#\# CHANGELOG.md | awk '{print $$2; exit}')
LDFLAGS:=-X jira.VERSION=$(patsubst v%,%,$(CURVER)) -w