builder: move some words to builder.util

db4
Eduardo Cavazos 2008-04-12 03:08:28 -05:00
parent c75c7236cd
commit 925750431e
2 changed files with 49 additions and 17 deletions

View File

@ -1,6 +1,6 @@
USING: kernel system namespaces sequences splitting combinators USING: kernel system namespaces sequences splitting combinators
io io.files io.launcher prettyprint io io.files io.launcher prettyprint bootstrap.image
bake combinators.cleave builder.common builder.util ; bake combinators.cleave builder.common builder.util ;
IN: builder.release IN: builder.release
@ -33,10 +33,6 @@ IN: builder.release
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: cpu- ( -- cpu ) cpu unparse "." split "-" join ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: base-name ( -- string ) : base-name ( -- string )
{ "factor" [ os unparse ] cpu- stamp> } to-strings "-" join ; { "factor" [ os unparse ] cpu- stamp> } to-strings "-" join ;
@ -89,8 +85,6 @@ IN: builder.release
SYMBOL: upload-to-factorcode SYMBOL: upload-to-factorcode
: platform ( -- string ) { [ os unparse ] cpu- } to-strings "-" join ;
: remote-location ( -- dest ) : remote-location ( -- dest )
"factorcode.org:/var/www/factorcode.org/newsite/downloads" "factorcode.org:/var/www/factorcode.org/newsite/downloads"
platform platform
@ -101,24 +95,59 @@ SYMBOL: upload-to-factorcode
[ "Error uploading binary to factorcode" print ] [ "Error uploading binary to factorcode" print ]
run-or-bail ; run-or-bail ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: maybe-upload ( -- ) : maybe-upload ( -- )
upload-to-factorcode get upload-to-factorcode get
[ upload ] [ upload ]
when ; when ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! update-clean-branch
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! : release ( -- ) : branch-name ( -- string )
! "factor" { "clean" [ os unparse ] cpu- } to-strings "-" join ;
! [
! remove-factor-app : refspec ( -- string ) "master:" branch-name append ;
! remove-common-files
! ] : push-to-clean-branch ( -- )
! with-directory { "git" "push" "factorcode.org:/git/factor.git" refspec }
! make-archive to-strings
! archive-name releases move-file-into ; try-process ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: upload-clean-image ( -- )
{
"scp"
my-boot-image-name
"factorcode.org:/var/www/factorcode.org/newsite/images/clean"
}
to-strings
try-process ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: update-clean-branch ( -- )
"factor"
[
push-to-clean-branch
upload-clean-image
]
with-directory ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: maybe-update-clean-branch ( -- )
upload-to-factorcode get
[ update-clean-branch ]
when ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: release ( -- ) : release ( -- )
maybe-update-clean-branch
"factor" "factor"
[ [
remove-factor-app remove-factor-app

View File

@ -2,6 +2,7 @@
USING: kernel words namespaces classes parser continuations USING: kernel words namespaces classes parser continuations
io io.files io.launcher io.sockets io io.files io.launcher io.sockets
math math.parser math math.parser
system
combinators sequences splitting quotations arrays strings tools.time combinators sequences splitting quotations arrays strings tools.time
sequences.deep accessors assocs.lib sequences.deep accessors assocs.lib
io.encodings.utf8 io.encodings.utf8
@ -94,4 +95,6 @@ USE: prettyprint
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: failsafe ( quot -- ) [ drop ] recover ; : cpu- ( -- cpu ) cpu unparse "." split "-" join ;
: platform ( -- string ) { [ os unparse ] cpu- } to-strings "-" join ;