Skip to content

Continuous Integration

Joel edited this page Jul 25, 2014 · 4 revisions

post-receive hook

#!/bin/bash
set -e
read OLD_HEAD NEW_HEAD REF_NAME
START_TIME=
WORK_DIR=$HOME/build_`date +'%Y%m%d_%H%M%S'`_git$NEW_HEAD
echo "Building $NEW_HEAD in $WORK_DIR"
mkdir -p $WORK_DIR

GIT_WORK_TREE=$WORK_DIR git checkout -f $NEW_HEAD
pushd $WORK_DIR
echo `date +'%Y-%m-%d %H:%M:%S'`" Starting build"
echo "We are in `pwd`"
source /opt/Xilinx/14.7/ISE_DS/settings64.sh
make
echo `date +'%Y-%m-%d %H:%M:%S'`" Build complete"
Clone this wiki locally