forked from crossbario/autobahn-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
96 lines (76 loc) · 3.04 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
BUILD_DATE=$(shell date -u +"%Y-%m-%d")
AUTOBAHN_JAVA_VERSION='18.5.2'
AUTOBAHN_JAVA_VCS_REF='unknown'
default:
@echo 'Build targets: clean build publish'
@echo 'Test targets: crossbar python java'
list:
-docker images crossbario/autobahn-java:*
clean:
sudo rm -rf ./.gradle/ ./build ./autobahn/build ./demo-gallery/build/
./removeall.sh
generate_changelog:
./changelog_gen.sh
build: build_toolchain build_android build_netty
publish: publish_toolchain publish_android publish_netty
#
# Demos
#
crossbar:
docker run \
--rm -it -p 8080:8080 --name crossbar \
crossbario/crossbar
python:
docker run \
-it --rm --link crossbar \
-v ${shell pwd}/demo-gallery/python:/test \
crossbario/autobahn-python \
python -u /test/test_component2.py
java:
docker run \
-it --rm --link crossbar \
-v ${shell pwd}:/workspace \
crossbario/autobahn-java:netty \
/bin/bash -c "gradle installDist -PbuildPlatform=netty && DEMO_GALLERY_OPTS="-DlogLevel=INFO" demo-gallery/build/install/demo-gallery/bin/demo-gallery ws://crossbar:8080/ws"
#
# Toolchain
#
build_toolchain:
docker build \
--build-arg BUILD_DATE=${BUILD_DATE} \
--build-arg AUTOBAHN_JAVA_VCS_REF=${AUTOBAHN_JAVA_VCS_REF} \
--build-arg AUTOBAHN_JAVA_VERSION=${AUTOBAHN_JAVA_VERSION} \
-t crossbario/autobahn-java \
-t crossbario/autobahn-java:netty \
-t crossbario/autobahn-java:netty-${AUTOBAHN_JAVA_VERSION} \
-f ./docker/Dockerfile.netty .
publish_toolchain:
docker push crossbario/autobahn-java
docker push crossbario/autobahn-java:netty
docker push crossbario/autobahn-java:netty-${AUTOBAHN_JAVA_VERSION}
check_toolchain:
docker run -it --rm crossbario/autobahn-java:netty /bin/bash -c "ls -la /autobahn && du -hs /autobahn"
#
# Library
#
build_android:
@echo 'Build Android apps from Android studio - nothing to build on command line here.'
publish_android: build_android
sed -i 's/DEBUG = true/DEBUG = false/g' autobahn/src/main/java/io/crossbar/autobahn/utils/Globals.java
AUTOBAHN_BUILD_VERSION=${AUTOBAHN_JAVA_VERSION} gradle bintrayUpload -PbuildPlatform=android
sed -i 's/DEBUG = false/DEBUG = true/g' autobahn/src/main/java/io/crossbar/autobahn/utils/Globals.java
publish_android_legacy: build_android
sed -i 's/DEBUG = true/DEBUG = false/g' autobahn/src/main/java/io/crossbar/autobahn/utils/Globals.java
$(shell ./enable_old_androids.sh)
AUTOBAHN_BUILD_VERSION=${AUTOBAHN_JAVA_VERSION} gradle bintrayUpload -PbuildPlatform=android -PbuildLegacy=true
sed -i 's/DEBUG = false/DEBUG = true/g' autobahn/src/main/java/io/crossbar/autobahn/utils/Globals.java
build_netty:
docker run -it --rm \
-e AUTOBAHN_BUILD_VERSION=${AUTOBAHN_JAVA_VERSION} \
-v ${shell pwd}:/workspace \
crossbario/autobahn-java:netty \
gradle -PbuildPlatform=netty distZip
publish_netty: build_netty
sed -i 's/DEBUG = true/DEBUG = false/g' autobahn/src/main/java/io/crossbar/autobahn/utils/Globals.java
AUTOBAHN_BUILD_VERSION=${AUTOBAHN_JAVA_VERSION} gradle bintrayUpload -PbuildPlatform=netty
sed -i 's/DEBUG = false/DEBUG = true/g' autobahn/src/main/java/io/crossbar/autobahn/utils/Globals.java