builder.release: refactor
parent
0272bff08d
commit
51faf8e337
|
@ -0,0 +1,34 @@
|
||||||
|
|
||||||
|
USING: system sequences prettyprint io.files io.launcher bootstrap.image
|
||||||
|
builder.util ;
|
||||||
|
|
||||||
|
IN: builder.release.branch
|
||||||
|
|
||||||
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
: branch-name ( -- string ) "clean-" platform append ;
|
||||||
|
|
||||||
|
: refspec ( -- string ) "master:" branch-name append ;
|
||||||
|
|
||||||
|
: push-to-clean-branch ( -- )
|
||||||
|
{ "git" "push" "factorcode.org:/git/factor.git" refspec }
|
||||||
|
to-strings
|
||||||
|
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 ;
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
|
||||||
|
USING: kernel system io.files io.launcher builder.util ;
|
||||||
|
|
||||||
|
IN: builder.release.tidy
|
||||||
|
|
||||||
|
: common-files ( -- seq )
|
||||||
|
{
|
||||||
|
"boot.x86.32.image"
|
||||||
|
"boot.x86.64.image"
|
||||||
|
"boot.macosx-ppc.image"
|
||||||
|
"boot.linux-ppc.image"
|
||||||
|
"vm"
|
||||||
|
"temp"
|
||||||
|
"logs"
|
||||||
|
".git"
|
||||||
|
".gitignore"
|
||||||
|
"Makefile"
|
||||||
|
"unmaintained"
|
||||||
|
"build-support"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
: remove-common-files ( -- )
|
||||||
|
{ "rm" "-rf" common-files } to-strings try-process ;
|
||||||
|
|
||||||
|
: remove-factor-app ( -- )
|
||||||
|
os macosx? not [ { "rm" "-rf" "Factor.app" } try-process ] when ;
|
||||||
|
|
||||||
|
: tidy ( -- )
|
||||||
|
"factor" [ remove-factor-app remove-common-files ] with-directory ;
|
|
@ -0,0 +1,24 @@
|
||||||
|
|
||||||
|
USING: kernel namespaces io io.files
|
||||||
|
builder.util
|
||||||
|
builder.common
|
||||||
|
builder.release.archive ;
|
||||||
|
|
||||||
|
IN: builder.release.upload
|
||||||
|
|
||||||
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
: 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 ;
|
||||||
|
|
||||||
|
: upload ( -- )
|
||||||
|
upload-to-factorcode get
|
||||||
|
[ (upload) ]
|
||||||
|
when ;
|
Loading…
Reference in New Issue