forked from crossbario/autobahn-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
86 lines (71 loc) · 2.77 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
BUILD_DATE=$(shell date -u +"%Y-%m-%d")
AUTOBAHN_JAVA_VERSION='17.10.5'
AUTOBAHN_JAVA_VCS_REF='unknown'
#export AUTOBAHN_TESTSUITE_VCS_REF=`git --git-dir="../autobahn-testsuite/.git" rev-list -n 1 v${AUTOBAHN_TESTSUITE_VERSION} --abbrev-commit`
#
# 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_component.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"
#
# Build
#
build_autobahn:
docker run -it --rm \
-v ${shell pwd}:/workspace \
crossbario/autobahn-java:netty \
gradle -PbuildPlatform=netty distZip
#
# 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}
#
# Publish the libraries.
#
publish_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:
# 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 -PbuildLegacy=true
# sed -i 's/DEBUG = false/DEBUG = true/g' autobahn/src/main/java/io/crossbar/autobahn/utils/Globals.java
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} gradle bintrayUpload -PbuildPlatform=netty
sed -i 's/DEBUG = false/DEBUG = true/g' autobahn/src/main/java/io/crossbar/autobahn/utils/Globals.java
generate_changelog:
./changelog_gen.sh
check_toolchain:
docker run -it --rm crossbario/autobahn-java:netty /bin/bash -c "ls -la /autobahn && du -hs /autobahn"
list:
-docker images crossbario/autobahn-java:*
clean:
sudo rm -rf ./.gradle/ ./build ./autobahn/build ./demo-gallery/build/
./removeall.sh