#!/bin/bash DEB_SERVER=http://localhost:9010/apt-`uname -p` echo "starting build..." ./build if [ "$?" = "0" ]; then echo "build succeeded" if [ ! -z "$PACKAGE" ]; then if [[ "$GIT_BRANCH" == *develop* || "$GIT_BRANCH" == *master* ]]; then echo "publishing ubuntu package (.deb)" DEBPATH=`find target/deb -name *.deb` DEBNAME=`basename $DEBPATH` curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME if [ "$?" != "0" ]; then echo "deb publish failed" exit 1 fi echo "done publishing deb" else echo "Skipping publish since branch is neither master or develop..." fi fi else echo "build failed" exit 1 fi