From 68b5e60dd924ba794ebf1c2e3076029f1f32e45c Mon Sep 17 00:00:00 2001 From: Cory Bennett Date: Wed, 29 Jun 2016 01:26:28 +0100 Subject: [PATCH] make binary name .exe for windows --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b587020..af424b0 100644 --- a/Makefile +++ b/Makefile @@ -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