Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Commit

Permalink
diffrent usage of sed between linux and osx
Browse files Browse the repository at this point in the history
  • Loading branch information
childe committed Aug 17, 2016
1 parent aa0d4a0 commit 1e66ea3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -17,13 +24,13 @@ build:
cp example.yml $(RELEASEPATH)
cp LICENSE $(RELEASEPATH)
cp bin/hangout $(RELEASEPATH)/bin
sed -i "" 's/\<elasticsearch-version\>[0-9.]*/<elasticsearch-version\>$(ESVERSION)/' pom.xml
$(SED) 's/\<elasticsearch-version\>[0-9.]*/<elasticsearch-version\>$(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

Expand Down

0 comments on commit 1e66ea3

Please sign in to comment.