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 \ darwin-amd64 \
$(NULL) $(NULL)
NAME=jira
OS=$(shell uname -s) OS=$(shell uname -s)
ifeq ($(filter CYGWIN%,$(OS)),$(OS)) ifeq ($(filter CYGWIN%,$(OS)),$(OS))
export CWD=$(shell cygpath -wa .) export CWD=$(shell cygpath -wa .)
export SEP=\\ export SEP=\\
export CYGWIN=winsymlinks:native export CYGWIN=winsymlinks:native
BIN ?= $(GOBIN)$(SEP)$(NAME).exe
else else
export CWD=$(shell pwd) export CWD=$(shell pwd)
export SEP=/ export SEP=/
BIN ?= $(GOBIN)$(SEP)$(NAME)
endif endif
export GOPATH=$(CWD) export GOPATH=$(CWD)
@@ -28,9 +32,7 @@ export GOPATH=$(CWD)
DIST=$(CWD)$(SEP)dist DIST=$(CWD)$(SEP)dist
GOBIN ?= $(CWD) GOBIN ?= $(CWD)
NAME=jira
BIN ?= $(GOBIN)$(SEP)$(NAME)
CURVER ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags || grep ^\#\# CHANGELOG.md | awk '{print $$2; exit}') CURVER ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags || grep ^\#\# CHANGELOG.md | awk '{print $$2; exit}')
LDFLAGS:=-X jira.VERSION=$(patsubst v%,%,$(CURVER)) -w LDFLAGS:=-X jira.VERSION=$(patsubst v%,%,$(CURVER)) -w