mason.docs: fix making and uploading of docs archive.

John Benediktsson 2012-06-18 12:26:02 -07:00
parent 53c54b86ab
commit f84cc7ed83
1 changed files with 11 additions and 8 deletions

View File

@ -1,20 +1,23 @@
! Copyright (C) 2008, 2010 Slava Pestov. ! Copyright (C) 2008, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: arrays hashtables help.html http.client io.directories USING: arrays hashtables help.html http.client io.directories
io.files io.launcher kernel make mason.common mason.config io.files io.files.temp io.launcher io.pathnames kernel make
namespaces sequences ; mason.common mason.config namespaces sequences ;
IN: mason.docs IN: mason.docs
: make-docs-archive ( -- ) : make-docs-archive ( -- )
"factor/temp" [ { "tar" "cfz" }
{ "tar" "cfz" "docs.tar.gz" "docs" } short-running-process "docs.tar.gz" temp-file suffix
] with-directory ; "docs" cache-file suffix
short-running-process ;
: upload-docs-archive ( -- ) : upload-docs-archive ( -- )
"factor/temp/docs.tar.gz" "docs.tar.gz" temp-file
docs-username get docs-username get
docs-host get docs-host get
docs-directory get "/docs.tar.gz" append docs-directory get "docs.tar.gz" append-path
upload-safely ; upload-safely ;
: notify-docs ( -- ) : notify-docs ( -- )
@ -28,4 +31,4 @@ IN: mason.docs
make-docs-archive make-docs-archive
upload-docs-archive upload-docs-archive
notify-docs notify-docs
] when ; ] when ;