-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
56 lines (42 loc) · 1.37 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
-include env.make
dist_dir = dist/reka
packaged = reka-server.tar.gz
dist_modules := $(shell ls | grep reka-module | sed 's/reka-module-//g')
.PHONY: clean test run package upload-s3
all: clean $(packaged)
$(dist_dir): .mvn-build
@mkdir -p $(dist_dir)
@cp -r dist-resources/* $(dist_dir)/
@mkdir -p $(dist_dir)/lib/
@mkdir -p $(dist_dir)/lib/modules
@mkdir -p $(dist_dir)/etc/apps
@cp reka-server/target/reka-server-*.jar $(dist_dir)/lib/reka-server.jar
@for module in $(dist_modules); do\
cp reka-module-$$module/target/reka-module-$$module-* $(dist_dir)/lib/modules ; \
done
@for module in `ls $(dist_dir)/lib/modules`; do\
echo "module ../lib/modules/$$module" >> $(dist_dir)/etc/config.reka; \
done
@echo "app api @include(apps/api.reka)" >> $(dist_dir)/etc/config.reka
package: $(packaged)
$(packaged): $(dist_dir)
@cd dist && tar zcvf $(packaged) reka && mv $(packaged) ..
@echo made $(packaged)
clean:
@rm -rf $(dist_dir)
@rm -rf $(packaged)
@rm -f .mvn-build
.mvn-build:
@mvn -DskipTests -T 1.5C clean package
@touch .mvn-build
test:
@mvn test
run: $(dist_dir)
@$(dist_dir)/bin/reka-server
run-nolog: $(dist_dir)
@JAVA_OPTS=-Dlog4j.configurationFile=log4j2-errors-only.xml $(dist_dir)/bin/reka-server
upload-s3: $(packaged)
@aws s3 \
cp $(packaged) s3://reka/reka-server.tar.gz \
--grants \
read=uri=http://acs.amazonaws.com/groups/global/AllUsers