r0xsh
3/10/2017 - 3:09 PM

Git hook, run Rust lang unit test

Git hook, run Rust lang unit test

#!/bin/sh

REPO_NAME=papers_database
GIT_DIR=$HOME/$REPO_NAME.git
WORK_DIR=$HOME/work/$REPO_NAME

mkdir -p $WORK_DIR

git --work-tree=$WORK_DIR --git-dir=$GIT_DIR checkout -f


cd $WORK_DIR


export PATH="$HOME/.cargo/bin:$PATH"

cargo test