factor/extra/mason/mason.factor

33 lines
889 B
Factor
Raw Normal View History

! 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.
USING: accessors calendar continuations debugger io
io.directories io.files kernel mason.common
mason.email mason.updates mason.notify namespaces threads ;
FROM: mason.build => build ;
2008-09-16 00:20:33 -04:00
IN: mason
: build-loop-error ( error -- )
[ "Build loop error:" print flush error. flush :c flush ]
[ 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