forked from childe/hangout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (49 loc) · 1.78 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
VERSION := 0.1.9
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
clean:
rm -rf release
build:
git checkout $(GITBRANCH)
mkdir -p $(RELEASEPATH)
mkdir -p $(RELEASEPATH)/bin
mkdir -p $(RELEASEPATH)/lib
mkdir -p $(RELEASEPATH)/vender
cp example.yml $(RELEASEPATH)
cp LICENSE $(RELEASEPATH)
cp bin/hangout $(RELEASEPATH)/bin
#$(SED) 's/\<elasticsearch-version\>[0-9.]*/<elasticsearch-version\>$(ESVERSION)/' pom.xml
git rev-parse --short HEAD > $(RELEASEPATH)/VERSION
mvn clean package -DskipTests
mvn dependency:copy-dependencies
cp target/hangout-$(VERSION).jar $(RELEASEPATH)/lib
cp target/dependency/* $(RELEASEPATH)/vender
$(SED) 's/X.X.X/$(VERSION)/' $(RELEASEPATH)/bin/hangout
tar -cf release/$(FULLVERSION).tar -C release $(FULLVERSION)
git reset --hard
test:
$(MAKE) build FULLVERSION=hangout-test GITBRANCH=$@ ESVERSION=2.3.5
dev:
$(MAKE) build FULLVERSION=hangout-dev GITBRANCH=$@ ESVERSION=2.3.5
2.3.5:
$(MAKE) build FULLVERSION=hangout-$(VERSION)-ES$@ GITBRANCH=master ESVERSION=2.3.5
5.0.0:
#git checkout 5.0.0
mkdir -p release/hangout-$(VERSION)-ES5.0.0
mkdir -p release/hangout-$(VERSION)-ES5.0.0/bin
mkdir -p release/hangout-$(VERSION)-ES5.0.0/lib
cp example.yml release/hangout-$(VERSION)-ES5.0.0
cp LICENSE release/hangout-$(VERSION)-ES5.0.0
cp bin/hangout release/hangout-$(VERSION)-ES5.0.0/bin
git rev-parse --short HEAD > release/hangout-$(VERSION)-ES5.0.0/VERSION
mvn clean package
cp target/hangout-$(VERSION)-with-dependencies.jar release/hangout-$(VERSION)-ES5.0.0/lib
$(SED) 's/X.X.X/$(VERSION)-with-dependencies/' release/hangout-$(VERSION)-ES5.0.0/bin/hangout
tar -cf release/hangout-$(VERSION)-ES5.0.0.tar -C release hangout-$(VERSION)-ES5.0.0