1 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel namespaces sequences prettyprint io.files
4 io.launcher make mason.common mason.platform mason.config ;
5 IN: mason.release.branch
7 : branch-name ( -- string ) "clean-" platform append ;
9 : refspec ( -- string ) "master:" branch-name append ;
11 : push-to-clean-branch-cmd ( -- args )
15 branch-username get % "@" %
16 branch-host get % ":" %
17 branch-directory get %
22 : push-to-clean-branch ( -- )
23 push-to-clean-branch-cmd short-running-process ;
25 : upload-clean-image-cmd ( -- args )
30 image-username get % "@" %
31 image-host get % ":" %
32 image-directory get % "/" %
37 : upload-clean-image ( -- )
38 upload-clean-image-cmd short-running-process ;
40 : (update-clean-branch) ( -- )
46 : update-clean-branch ( -- )
47 upload-to-factorcode? get [ (update-clean-branch) ] when ;