Skip to content

Commit

Permalink
V17.5.2 (#302)
Browse files Browse the repository at this point in the history
* prepare for release

* add dockerfile based library build
  • Loading branch information
oberstet committed May 23, 2017
1 parent 37fb323 commit 04b2742
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 4 deletions.
41 changes: 41 additions & 0 deletions Dockerfile
@@ -0,0 +1,41 @@
FROM ubuntu:xenial

RUN apt-get update \
&& apt-get install -y npm \
nodejs-legacy \
default-jre \
python \
python-pip \
wget \
curl \
unzip \
git-core \
build-essential \
autotools-dev \
autoconf \
libtool \
cmake \
scons \
zlib1g-dev \
libbz2-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

# https://nodejs.org/dist/v6.10.3/node-v6.10.3-linux-x64.tar.xz
# tar xvf node-v*.tar.?z --strip-components=1 -C ./node
# sudo ln -s /opt/node/bin/node /usr/local/bin/node
# sudo ln -s /opt/node/bin/npm /usr/local/bin/npm


RUN npm install -g google-closure-compiler nodeunit

RUN pip install -U scons boto taschenmesser

VOLUME /work

WORKDIR /work

ENV JAVA_HOME /usr/lib/jvm/default-java

CMD ["make", "browser_deps", "build"]
20 changes: 20 additions & 0 deletions Makefile
Expand Up @@ -32,6 +32,7 @@ build: build_browser build_npm

build_browser:
scons
java -jar /usr/local/lib/node_modules/google-closure-compiler/compiler.jar --version

build_npm:
@echo "Ok, npm doesn't need a build step"
Expand All @@ -55,6 +56,7 @@ crossbar:

test:
npm test
npm list ws bufferutil when crypto-js

test_connect:
nodeunit test/test_connect.js
Expand All @@ -64,3 +66,21 @@ test_serialization_cbor:

test_pubsub_multiple_matching_subs:
nodeunit test/test_pubsub_multiple_matching_subs.js


toolchain_build:
docker build -t autobahnjs-toolchain -f Dockerfile .

toolchain_run: toolchain_build
docker run -it --rm \
--net=host \
-v ${PWD}:/work \
autobahnjs-toolchain \
make browser_deps build

toolchain_shell:
docker run -it --rm \
--net=host \
-v ${PWD}:/work \
autobahnjs-toolchain \
bash
2 changes: 1 addition & 1 deletion SConstruct
Expand Up @@ -27,7 +27,7 @@ sources = [os.path.join(sourcedir, d) for d in os.listdir(sourcedir)]
# browserified
ab = env.Command("build/autobahn.js",
"lib/autobahn.js",
"/usr/local/lib/node_modules/browserify/bin/cmd.js $SOURCE --ignore-missing --standalone autobahn -o $TARGET")
"./node_modules/browserify/bin/cmd.js $SOURCE --ignore-missing --standalone autobahn -o $TARGET")
Depends(ab, sources)

# minimized (with Google Closure)
Expand Down
18 changes: 15 additions & 3 deletions test/test_cryptosign.html
Expand Up @@ -11,8 +11,8 @@ <h1>Open JavaScript console to watch log output (hit F12)</h1>
// either null, to connect to the global user management realm or
// a specific management realm to which the user must have
// access permissions.
realm: null,
//realm: "oberstet1",
//realm: null,
realm: "oberstet1",

// the user email (used as authid)
authid: "tobias.oberstein@gmail.com",
Expand All @@ -22,7 +22,7 @@ <h1>Open JavaScript console to watch log output (hit F12)</h1>

// the activation code must be set exactly once during exchange
activation_code: null,
//activation_code: "YK9Y-33A6-WEW3",
//activation_code: "TLLE-G39P-5C7M",

// this is an optional feature (see below)
request_new_activation_code: false
Expand Down Expand Up @@ -70,6 +70,8 @@ <h1>Open JavaScript console to watch log output (hit F12)</h1>
//
if (fabric_info.type == 'users') {
console.log("Connected to global users realm.");

// list management realms
session.call('com.crossbario.fabric.list_management_realms', null, {verbose: true}).then(
function (mrealms) {
//
Expand All @@ -94,6 +96,16 @@ <h1>Open JavaScript console to watch log output (hit F12)</h1>
);
} else {
console.log("Connected to management realm ", fabric_info.name);

// list nodes
session.call('com.crossbario.fabric.list_nodes', null, {verbose: true}).then(
function (nodes) {
console.log("Nodes:", nodes);
},
function (err) {
console.log(err);
}
);
}
},
function (err) {
Expand Down

0 comments on commit 04b2742

Please sign in to comment.