Loading configure.ac +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # AC_INIT([git-hooks], [0.1.4]) AC_INIT([git-hooks], [0.1.5]) AM_INIT_AUTOMAKE gitcoredir=`git --exec-path` Loading hook-scripts/post-receive/auto-build +7 −5 Original line number Diff line number Diff line Loading @@ -174,9 +174,10 @@ build () fi # lock the build dir mkdir -p "`dirname "$dbuild".`" while true; do for i in `seq 1 $dmax`; do dir="$dbuild$i" dir=`readlink -f "$dbuild$i"` lock="$dir.lock" until _acquired_lock "$lock"; do _clear_stale_lock "$lock" || break Loading @@ -186,7 +187,8 @@ build () _acquired_lock "$lock" && break sleep 4 done trap "[ -L '$lock' ] && rm '$lock'" EXIT trap "[ -e '$dir' ] && rm -r '$dir'; [ -L '$lock' ] && rm '$lock'" \ RETURN EXIT # create the build dir if it does not exist & remove any stickbits set by # the parent; prevents permissions from being forced to values that may Loading Loading @@ -270,14 +272,14 @@ main () { local old new ref local log log_dir log_current local dbuild=`config location || echo /tmp/build/` dbuild=`dirname "$dbuild".` local dlog=`config log-location || echo /var/log/auto-build` local repo=`basename "$PWD"` while read old new ref; do if [ $((0x$new)) -eq 0 ]; then continue fi if [ "$ref" ]; then log="$dbuild/logs/$ref/`date +%s`.log" log="$dlog/$repo/$ref/`date +%s`.log" log_dir=`dirname "$log"` log_current="$log_dir/current.log" mkdir -p "$log_dir" Loading Loading
configure.ac +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # AC_INIT([git-hooks], [0.1.4]) AC_INIT([git-hooks], [0.1.5]) AM_INIT_AUTOMAKE gitcoredir=`git --exec-path` Loading
hook-scripts/post-receive/auto-build +7 −5 Original line number Diff line number Diff line Loading @@ -174,9 +174,10 @@ build () fi # lock the build dir mkdir -p "`dirname "$dbuild".`" while true; do for i in `seq 1 $dmax`; do dir="$dbuild$i" dir=`readlink -f "$dbuild$i"` lock="$dir.lock" until _acquired_lock "$lock"; do _clear_stale_lock "$lock" || break Loading @@ -186,7 +187,8 @@ build () _acquired_lock "$lock" && break sleep 4 done trap "[ -L '$lock' ] && rm '$lock'" EXIT trap "[ -e '$dir' ] && rm -r '$dir'; [ -L '$lock' ] && rm '$lock'" \ RETURN EXIT # create the build dir if it does not exist & remove any stickbits set by # the parent; prevents permissions from being forced to values that may Loading Loading @@ -270,14 +272,14 @@ main () { local old new ref local log log_dir log_current local dbuild=`config location || echo /tmp/build/` dbuild=`dirname "$dbuild".` local dlog=`config log-location || echo /var/log/auto-build` local repo=`basename "$PWD"` while read old new ref; do if [ $((0x$new)) -eq 0 ]; then continue fi if [ "$ref" ]; then log="$dbuild/logs/$ref/`date +%s`.log" log="$dlog/$repo/$ref/`date +%s`.log" log_dir=`dirname "$log"` log_current="$log_dir/current.log" mkdir -p "$log_dir" Loading