diff --git a/src/sdk/README.md b/src/sdk/README.md index e0aaa1c91..d3433a013 100644 --- a/src/sdk/README.md +++ b/src/sdk/README.md @@ -1,5 +1,7 @@ # BTS Spark SDK +#### Getting Started + ## Docker 1) Setup docker on your preferred OS and pull down the BTS docker @@ -33,7 +35,7 @@ $ docker run \ $ ssh root@host -p 2323 password is also root ``` - * This docker command can also be found in ``~/spark_sdk/sdk_shell.sh`` if you want to reuse it + * This docker command can also be found in [``~/spark_sdk/sdk_shell.sh``](sdk_shell.sh) if you want to reuse it ## Git * We assume the git you are using is git-lfs compatible; if you're using the git that comes with our docker, you're all set. @@ -51,9 +53,9 @@ $ cd spark_sdk ## Development -Look at ```examples/md_publisher_example.cpp``` to look at how to provide a custom market data producer +Look at [examples/md_publisher_example.cpp](https://github.com/BlueTradingSystems/spark_sdk/blob/master/examples/md_publisher_example.cpp) to look at how to provide a custom market data producer -Look at ```examples/order_plugin_example.cpp``` to look at how to create custom algos. +Look at [examples/order_plugin_example.cpp](https://github.com/BlueTradingSystems/spark_sdk/blob/master/examples/order_plugin_example.cpp) to look at how to create custom algos. run ```build_examples.sh``` to make sure you can build the examples, this will produce an ```order_plugin_example.so``` diff --git a/src/sdk/make_sdk.sh b/src/sdk/make_sdk.sh index dfcefc41e..0d75c21de 100755 --- a/src/sdk/make_sdk.sh +++ b/src/sdk/make_sdk.sh @@ -19,18 +19,9 @@ mkdir -p $1/sdk/externals/ (cd $1/src && find lib -type f -name "*.h" -exec cp --parents \{\} $1/sdk/include/spark/ \;) (cd $1/src && find lib -type f -name "*.cc" -exec cp --parents \{\} $1/sdk/include/spark/ \;) -#ln -sf $2/../../externals/linux/include $1/sdk/externals/include -mkdir -p $1/sdk/externals/include -cp -r $2/../../externals/linux/include/* $1/sdk/externals/include -rm -rf $1/sdk/externals/include/OnixS/ -#ln -sf $2/../../externals/linux/lib/Release $1/sdk/externals/lib -mkdir -p $1/sdk/externals/lib -cp -r $2/../../externals/linux/lib/Release/* $1/sdk/externals/lib -rm -f $1/sdk/externals/lib/libonixs* - +ln -sf $2/../../externals/linux/include $1/sdk/externals/include +ln -sf $2/../../externals/linux/lib/Release $1/sdk/externals/lib ln -sf $1/server $1/sdk/lib -#mkdir $1/sdk/lib -#cp -r $1/server/* $1/sdk/lib mkdir $1/sdk/examples cp $2/examples/* $1/sdk/examples diff --git a/src/sdk/update_github.sh b/src/sdk/update_github.sh index 2fd7cd9da..71f771aa8 100644 --- a/src/sdk/update_github.sh +++ b/src/sdk/update_github.sh @@ -1,10 +1,13 @@ #!/bin/bash if [ "$#" -lt 2 ]; then - echo "update_github.sh [-push_params]" + echo "update_github.sh [tag] [-push_params]" + echo "set tag to 'stage' if you don't want to push" exit 0 fi +if [ "$2" == "stage" ]; then echo "STAGE ONLY"; fi + git lfs install STAGE="/tmp/bts_staging" @@ -12,17 +15,27 @@ if [ -d "$STAGE" ]; then rm -rf $STAGE fi mkdir $STAGE -git clone --recurse-submodules $1 $STAGE/spark_sdk -cp -rL ./* $STAGE/spark_sdk/ +git clone --recurse-submodules "$1" $STAGE/spark_sdk +cp -L -r -f ./** $STAGE/spark_sdk/ pushd $STAGE/spark_sdk -#push updates -git status -git add . -git commit -m "spark_sdk update $2" -git tag $2 -git push origin master --tags $3 +#clean all the stuff we don't want in github +rm ./examples/md_publisher_example +rm ./examples/order_plugin_example.so +rm ./lib/data_files/cert_secure_logon.txt +rm -r ./externals/lib/libonixs* +rm -r ./externals/include/OnixS/ +rm -r ./externals/lib/celoxica/ +rm -r ./externals/include/celoxica/ -popd -rm -rf $STAGE +if [ "$2" != "stage" ]; then + git status + git add . + git commit -m "spark_sdk update $2" + git tag "$2" + git push origin master --tags $3 + + popd + rm -rf $STAGE +fi