From 1e66ea388acd20e1687cae242f8c40aa3f055107 Mon Sep 17 00:00:00 2001 From: childe Date: Wed, 17 Aug 2016 14:51:58 +0800 Subject: [PATCH] diffrent usage of sed between linux and osx --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0745d719..b635a019 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,13 @@ VERSION := 0.1.8.2 RELEASEPATH = release/$(FULLVERSION) +UNAME := $(shell uname) +ifeq ($(UNAME), Darwin) + SED=sed -i "" +else + SED=sed -i +endif + default: 2.3.2 all: 2.3.2 2.3.5 @@ -17,13 +24,13 @@ build: cp example.yml $(RELEASEPATH) cp LICENSE $(RELEASEPATH) cp bin/hangout $(RELEASEPATH)/bin - sed -i "" 's/\[0-9.]*/$(ESVERSION)/' pom.xml + $(SED) 's/\[0-9.]*/$(ESVERSION)/' pom.xml git rev-parse --short HEAD > $(RELEASEPATH)/VERSION mvn clean package mvn dependency:copy-dependencies cp target/hangout-$(VERSION).jar $(RELEASEPATH)/lib cp target/dependency/* $(RELEASEPATH)/vender - sed -i '' 's/X.X.X/$(VERSION)/' $(RELEASEPATH)/bin/hangout + $(SED) 's/X.X.X/$(VERSION)/' $(RELEASEPATH)/bin/hangout tar -cf release/$(FULLVERSION).tar -C release $(FULLVERSION) git reset --hard