2010-04-11 21:42:12 -04:00
|
|
|
! Copyright (C) 2008, 2010 Eduardo Cavazos, Slava Pestov.
|
2008-09-16 00:20:33 -04:00
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2009-05-15 00:23:06 -04:00
|
|
|
USING: accessors calendar continuations debugger io
|
|
|
|
io.directories io.files kernel mason.common
|
2010-04-11 21:42:12 -04:00
|
|
|
mason.email mason.updates mason.notify namespaces threads ;
|
2009-05-15 00:23:06 -04:00
|
|
|
FROM: mason.build => build ;
|
2008-09-16 00:20:33 -04:00
|
|
|
IN: mason
|
|
|
|
|
|
|
|
: build-loop-error ( error -- )
|
2010-02-01 13:41:04 -05:00
|
|
|
[ "Build loop error:" print flush error. flush :c flush ]
|
2009-04-17 21:59:59 -04:00
|
|
|
[ error-continuation get call>> email-error ] bi ;
|
2008-09-16 00:20:33 -04:00
|
|
|
|
|
|
|
: build-loop-fatal ( error -- )
|
|
|
|
"FATAL BUILDER ERROR:" print
|
|
|
|
error. flush ;
|
|
|
|
|
|
|
|
: build-loop ( -- )
|
|
|
|
?prepare-build-machine
|
|
|
|
[
|
2010-04-15 01:08:47 -04:00
|
|
|
notify-heartbeat
|
2008-09-16 00:20:33 -04:00
|
|
|
[
|
|
|
|
builds/factor set-current-directory
|
|
|
|
new-code-available? [ build ] when
|
|
|
|
] [
|
|
|
|
build-loop-error
|
|
|
|
] recover
|
|
|
|
] [
|
|
|
|
build-loop-fatal
|
|
|
|
] recover
|
|
|
|
5 minutes sleep
|
|
|
|
build-loop ;
|
|
|
|
|
|
|
|
MAIN: build-loop
|