diff --git a/git-build.sh b/git-build.sh index 6a98635..550d4cc 100755 --- a/git-build.sh +++ b/git-build.sh @@ -47,6 +47,16 @@ if [[ ${#PROJECTS[*]} = 0 ]]; then fi for p_name in ${PROJECTS[*]}; do + # Check if task should run on host + if [[ $LOCAL = 0 ]]; then + if [ -f $BASEDIR/$p_name.host ] && [[ "$(cat $BASEDIR/$p_name.host)" != "$HOSTNAME" ]]; then + # The task is specifically configured for a different host, ignore + echo "[$p_name] SKIPPED" + continue + fi + # The task has a PROJECT.ignore file in host config, ignore + [ -f $BASEDIR/$HOSTNAME/$p_name.ignore ] && echo "[$p_name] IGNORED" && continue + fi echo "[$p_name] START" [ -f $BASEDIR/$p_name.branch ] && p_branch="$(cat $BASEDIR/$p_name.branch)" || p_branch="master" p_dir="$BASEDIR/.$p_name"