diff --git a/extra/builder/cleanup/cleanup.factor b/extra/builder/cleanup/cleanup.factor index 327b90e01f..e601506fb4 100644 --- a/extra/builder/cleanup/cleanup.factor +++ b/extra/builder/cleanup/cleanup.factor @@ -8,6 +8,8 @@ IN: builder.cleanup SYMBOL: builder-debug +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + : compress-image ( -- ) { "bzip2" my-boot-image-name } to-strings try-process ; : delete-child-factor ( -- ) diff --git a/extra/builder/common/common.factor b/extra/builder/common/common.factor index e3c207eaaa..474606e451 100644 --- a/extra/builder/common/common.factor +++ b/extra/builder/common/common.factor @@ -7,6 +7,10 @@ IN: builder.common ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +SYMBOL: upload-to-factorcode + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + SYMBOL: builds-dir : builds ( -- path ) @@ -21,15 +25,6 @@ VAR: stamp : builds/factor ( -- path ) builds "factor" append-path ; : build-dir ( -- path ) builds stamp> append-path ; -: create-build-dir ( -- ) - datestamp >stamp - build-dir make-directory ; - -: enter-build-dir ( -- ) build-dir set-current-directory ; - -: clone-builds-factor ( -- ) - { "git" "clone" builds/factor } to-strings try-process ; - ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! : prepare-build-machine ( -- ) @@ -57,8 +52,3 @@ SYMBOL: status { status-vm status-boot status-test status-build status-release status } [ off ] each ; - -! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -SYMBOL: upload-to-factorcode - diff --git a/extra/builder/email/email.factor b/extra/builder/email/email.factor index eed48cb177..ecde47f8f7 100644 --- a/extra/builder/email/email.factor +++ b/extra/builder/email/email.factor @@ -8,6 +8,8 @@ IN: builder.email SYMBOL: builder-from SYMBOL: builder-recipients +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + : subject-status ( -- str ) status get [ "report" ] [ "error" ] if ; : subject ( -- str ) { "builder@" host-name* ": " subject-status } to-string ; diff --git a/extra/update/update.factor b/extra/update/update.factor new file mode 100644 index 0000000000..f186837548 --- /dev/null +++ b/extra/update/update.factor @@ -0,0 +1,62 @@ + +USING: kernel system sequences io.files io.launcher bootstrap.image + builder.util builder.release.branch ; + +IN: update + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: run-command ( cmd -- ) to-strings try-process ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: git-pull-clean ( -- ) + image parent-directory + [ + { "git" "pull" "git://factorcode.org/git/factor.git" branch-name } + run-command + ] + with-directory ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: remote-clean-image ( -- url ) + "http://factorcode.org/images/clean/" my-boot-image-name append ; + +: download-clean-image ( -- ) { "wget" remote-clean-image } run-command ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: make-clean ( -- ) { gnu-make "clean" } run-command ; +: make ( -- ) { gnu-make } run-command ; +: boot ( -- ) { "./factor" { "-i=" my-boot-image-name } } run-command ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: rebuild ( -- ) + image parent-directory + [ + download-clean-image + make-clean + make + boot + ] + with-directory ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: update ( -- ) + image parent-directory + [ + git-id + git-pull-clean + git-id + = not + [ rebuild ] + when + ] + with-directory ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +MAIN: update \ No newline at end of file