USING: arrays kernel calendar io.directories io.encodings.utf8
io.files io.launcher io.pathnames namespaces prettyprint
combinators mason.child mason.cleanup mason.common mason.config
-mason.help mason.release mason.report mason.email mason.git
+mason.docs mason.release mason.report mason.email mason.git
mason.notify mason.platform mason.updates ;
QUALIFIED: continuations
IN: mason.build
begin-build
build-child
[ notify-report ]
- [ status-clean eq? [ upload-help release ] when ] bi
+ [ status-clean eq? [ upload-docs release ] when ] bi
finish-build
] [ cleanup ] [ ] continuations:cleanup ;
-! Copyright (C) 2008, 2009 Slava Pestov.
+! Copyright (C) 2008, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: arrays help.html io.directories io.files io.launcher
-kernel make mason.common mason.config namespaces sequences ;
-IN: mason.help
+USING: arrays hashtables help.html http.client io.directories
+io.files io.launcher kernel make mason.common mason.config
+namespaces sequences ;
+IN: mason.docs
-: make-help-archive ( -- )
+: make-docs-archive ( -- )
"factor/temp" [
{ "tar" "cfz" "docs.tar.gz" "docs" } short-running-process
] with-directory ;
-: upload-help-archive ( -- )
+: upload-docs-archive ( -- )
"factor/temp/docs.tar.gz"
- help-username get
- help-host get
- help-directory get "/docs.tar.gz" append
+ docs-username get
+ docs-host get
+ docs-directory get "/docs.tar.gz" append
upload-safely ;
-: upload-help ( -- )
- upload-help? get [
- make-help-archive
- upload-help-archive
+: notify-docs ( -- )
+ status-secret get "secret" associate
+ docs-update-url get
+ http-post
+ 2drop ;
+
+: upload-docs ( -- )
+ upload-docs? get [
+ make-docs-archive
+ upload-docs-archive
+ notify-docs
] when ;
\ No newline at end of file