Merge branch 'master' of git://factorcode.org/git/factor

db4
Slava Pestov 2008-04-04 22:41:06 -05:00
commit 1d3e22a60c
1 changed files with 41 additions and 18 deletions

View File

@ -2,7 +2,7 @@
USING: kernel namespaces sequences splitting system combinators continuations USING: kernel namespaces sequences splitting system combinators continuations
parser io io.files io.launcher io.sockets prettyprint threads parser io io.files io.launcher io.sockets prettyprint threads
bootstrap.image benchmark vars bake smtp builder.util accessors bootstrap.image benchmark vars bake smtp builder.util accessors
io.encodings.utf8 debugger io.encodings.utf8
calendar calendar
tools.test tools.test
builder.common builder.common
@ -17,10 +17,18 @@ IN: builder
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: builds/factor ( -- path ) builds "factor" append-path ;
: build-dir ( -- path ) builds stamp> append-path ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: prepare-build-machine ( -- ) : prepare-build-machine ( -- )
builds make-directory builds make-directory
builds cd builds
{ "git" "clone" "git://factorcode.org/git/factor.git" } run-process drop ; [
{ "git" "clone" "git://factorcode.org/git/factor.git" } try-process
]
with-directory ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -70,8 +78,8 @@ IN: builder
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: copy-image ( -- ) : copy-image ( -- )
builds "factor" append-path my-boot-image-name append-path ".." copy-file-into builds/factor my-boot-image-name append-path ".." copy-file-into
builds "factor" append-path my-boot-image-name append-path "." copy-file-into ; builds/factor my-boot-image-name append-path "." copy-file-into ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -184,15 +192,27 @@ SYMBOL: builder-recipients
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: compress-image ( -- ) : compress-image ( -- ) { "bzip2" my-boot-image-name } to-strings try-process ;
{ "bzip2" my-boot-image-name } to-strings run-process drop ;
! : build ( -- )
! [ (build) ] try
! builds cd stamp> cd
! [ send-builder-email ] try
! { "rm" "-rf" "factor" } [ ] run-or-bail
! [ compress-image ] try ;
: build ( -- ) : build ( -- )
[ (build) ] failsafe [
builds cd stamp> cd (build)
[ send-builder-email ] [ drop "not sending mail" . ] recover build-dir
{ "rm" "-rf" "factor" } run-process drop [
[ compress-image ] failsafe ; { "rm" "-rf" "factor" } try-process
compress-image
]
with-directory
]
try
send-builder-email ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -209,7 +229,7 @@ USE: bootstrap.image.download
: updates-available? ( -- ? ) : updates-available? ( -- ? )
git-id git-id
git-pull run-process drop git-pull try-process
git-id git-id
= not ; = not ;
@ -222,12 +242,15 @@ USE: bootstrap.image.download
: build-loop ( -- ) : build-loop ( -- )
builds-check builds-check
[ [
builds "/factor" append cd builds/factor
[
updates-available? new-image-available? or updates-available? new-image-available? or
[ build ] [ build ]
when when
] ]
failsafe with-directory
]
try
5 minutes sleep 5 minutes sleep
build-loop ; build-loop ;