Honor PROJECT.host and $HOSTNAME/PROJECT.ignore
This commit is contained in:
parent
a3870ffaf4
commit
beca1ef2fe
10
git-build.sh
10
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"
|
||||
|
|
Loading…
Reference in New Issue