-
Notifications
You must be signed in to change notification settings - Fork 426
/
Makefile
90 lines (72 loc) · 2.79 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
BUILD_DATE=$(shell date -u +"%Y-%m-%d")
AUTOBAHN_JAVA_VERSION='21.7.1'
# git log --pretty=format:'%h' -n 1
AUTOBAHN_JAVA_VCS_REF='d9a591ca2cbae15dff27a40b4075c48a251c60f3'
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} ./gradlew :autobahn:publishReleasePublicationToCentralRepository -PbuildPlatform=android
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:
sed -i 's/DEBUG = true/DEBUG = false/g' autobahn/src/main/java/io/crossbar/autobahn/utils/Globals.java
AUTOBAHN_BUILD_VERSION=${AUTOBAHN_JAVA_VERSION} ./gradlew :autobahn:publishReleasePublicationToCentralRepository -PbuildPlatform=netty
sed -i 's/DEBUG = false/DEBUG = true/g' autobahn/src/main/java/io/crossbar/autobahn/utils/Globals.java