2008-02-22 18:25:42 -05:00
|
|
|
|
2008-03-01 04:01:51 -05:00
|
|
|
USING: kernel system namespaces sequences splitting combinators
|
2008-04-12 04:08:28 -04:00
|
|
|
io io.files io.launcher prettyprint bootstrap.image
|
2008-04-12 04:14:26 -04:00
|
|
|
bake combinators.cleave
|
|
|
|
builder.util
|
|
|
|
builder.common
|
|
|
|
builder.release.archive ;
|
2008-02-22 18:25:42 -05:00
|
|
|
|
|
|
|
IN: builder.release
|
|
|
|
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
2008-03-01 04:01:51 -05:00
|
|
|
: releases ( -- path )
|
2008-03-19 20:15:32 -04:00
|
|
|
builds "releases" append-path
|
2008-03-01 04:01:51 -05:00
|
|
|
dup exists? not
|
|
|
|
[ dup make-directory ]
|
|
|
|
when ;
|
2008-02-22 18:25:42 -05:00
|
|
|
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
|
|
: common-files ( -- seq )
|
|
|
|
{
|
|
|
|
"boot.x86.32.image"
|
|
|
|
"boot.x86.64.image"
|
2008-03-07 09:52:23 -05:00
|
|
|
"boot.macosx-ppc.image"
|
2008-03-28 00:18:43 -04:00
|
|
|
"boot.linux-ppc.image"
|
2008-02-22 18:25:42 -05:00
|
|
|
"vm"
|
|
|
|
"temp"
|
|
|
|
"logs"
|
|
|
|
".git"
|
|
|
|
".gitignore"
|
|
|
|
"Makefile"
|
|
|
|
"unmaintained"
|
2008-03-28 00:18:43 -04:00
|
|
|
"build-support"
|
2008-02-22 18:25:42 -05:00
|
|
|
} ;
|
|
|
|
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
2008-03-01 04:01:51 -05:00
|
|
|
: remove-common-files ( -- )
|
|
|
|
{ "rm" "-rf" common-files } to-strings try-process ;
|
2008-02-25 19:39:27 -05:00
|
|
|
|
2008-03-01 04:01:51 -05:00
|
|
|
: remove-factor-app ( -- )
|
2008-04-04 16:22:21 -04:00
|
|
|
os macosx? not [ { "rm" "-rf" "Factor.app" } try-process ] when ;
|
2008-02-22 18:25:42 -05:00
|
|
|
|
2008-03-26 20:22:25 -04:00
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
|
|
SYMBOL: upload-to-factorcode
|
|
|
|
|
|
|
|
: remote-location ( -- dest )
|
|
|
|
"factorcode.org:/var/www/factorcode.org/newsite/downloads"
|
|
|
|
platform
|
|
|
|
append-path ;
|
|
|
|
|
|
|
|
: upload ( -- )
|
|
|
|
{ "scp" archive-name remote-location } to-strings
|
|
|
|
[ "Error uploading binary to factorcode" print ]
|
|
|
|
run-or-bail ;
|
|
|
|
|
2008-04-12 04:08:28 -04:00
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
2008-03-26 20:22:25 -04:00
|
|
|
: maybe-upload ( -- )
|
|
|
|
upload-to-factorcode get
|
|
|
|
[ upload ]
|
|
|
|
when ;
|
|
|
|
|
2008-04-12 04:08:28 -04:00
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
! update-clean-branch
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
|
|
: branch-name ( -- string )
|
|
|
|
{ "clean" [ os unparse ] cpu- } to-strings "-" join ;
|
|
|
|
|
|
|
|
: refspec ( -- string ) "master:" branch-name append ;
|
|
|
|
|
|
|
|
: push-to-clean-branch ( -- )
|
|
|
|
{ "git" "push" "factorcode.org:/git/factor.git" refspec }
|
|
|
|
to-strings
|
|
|
|
try-process ;
|
|
|
|
|
2008-03-26 20:22:25 -04:00
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
2008-04-12 04:08:28 -04:00
|
|
|
: 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 ;
|
|
|
|
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
2008-03-26 20:22:25 -04:00
|
|
|
|
2008-02-22 18:25:42 -05:00
|
|
|
: release ( -- )
|
2008-04-12 04:08:28 -04:00
|
|
|
maybe-update-clean-branch
|
2008-03-01 04:01:51 -05:00
|
|
|
"factor"
|
|
|
|
[
|
|
|
|
remove-factor-app
|
|
|
|
remove-common-files
|
|
|
|
]
|
|
|
|
with-directory
|
|
|
|
make-archive
|
2008-03-26 20:22:25 -04:00
|
|
|
maybe-upload
|
2008-03-01 04:01:51 -05:00
|
|
|
archive-name releases move-file-into ;
|
2008-02-24 22:30:45 -05:00
|
|
|
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
|
|
: release? ( -- ? )
|
|
|
|
{
|
2008-02-25 23:24:15 -05:00
|
|
|
"./load-everything-vocabs"
|
|
|
|
"./test-all-vocabs"
|
2008-02-24 22:30:45 -05:00
|
|
|
}
|
|
|
|
[ eval-file empty? ]
|
|
|
|
all? ;
|
|
|
|
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
|
|
: maybe-release ( -- ) release? [ release ] when ;
|