1 ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: io.directories io.files io.launcher kernel make
4 mason.common mason.config mason.platform namespaces prettyprint
6 IN: mason.release.branch
8 : branch-name ( -- string ) "clean-" platform append ;
10 : refspec ( -- string ) "master:" branch-name append ;
12 : push-to-clean-branch-cmd ( -- args )
16 branch-username get % "@" %
17 branch-host get % ":" %
18 branch-directory get %
23 : push-to-clean-branch ( -- )
24 push-to-clean-branch-cmd short-running-process ;
26 : upload-clean-image-cmd ( -- args )
31 image-username get % "@" %
32 image-host get % ":" %
33 image-directory get % "/" %
38 : upload-clean-image ( -- )
39 upload-clean-image-cmd short-running-process ;
41 : (update-clean-branch) ( -- )
47 : update-clean-branch ( -- )
48 upload-to-factorcode? get [ (update-clean-branch) ] when ;