2011-09-09 22:13:06 -04:00
|
|
|
! Copyright (C) 2008, 2011 Eduardo Cavazos, Slava Pestov.
|
2008-09-16 00:20:33 -04:00
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2014-11-15 19:20:49 -05:00
|
|
|
USING: kernel mason.common mason.config mason.platform
|
|
|
|
namespaces sequences ;
|
2008-09-16 00:20:33 -04:00
|
|
|
IN: mason.release.upload
|
|
|
|
|
|
|
|
: remote-location ( -- dest )
|
2011-09-09 22:13:06 -04:00
|
|
|
package-directory get "/" platform 3append ;
|
2008-09-16 00:20:33 -04:00
|
|
|
|
2009-04-17 21:59:59 -04:00
|
|
|
: remote-archive-name ( archive-name -- dest )
|
|
|
|
[ remote-location "/" ] dip 3append ;
|
2008-09-16 00:20:33 -04:00
|
|
|
|
2009-04-17 21:59:59 -04:00
|
|
|
: upload ( archive-name -- )
|
2011-09-09 22:13:06 -04:00
|
|
|
upload-package? get [
|
|
|
|
package-username get
|
|
|
|
package-host get
|
2009-04-17 21:59:59 -04:00
|
|
|
pick remote-archive-name
|
2008-11-16 12:29:35 -05:00
|
|
|
upload-safely
|
2009-04-17 21:59:59 -04:00
|
|
|
] [ drop ] if ;
|