]> gitweb.factorcode.org Git - factor.git/commitdiff
mason: check hosts we'll need at the beginning
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 17 Jan 2023 16:49:12 +0000 (08:49 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 17 Jan 2023 16:49:28 +0000 (08:49 -0800)
extra/mason/mason.factor

index 05d4e39320dc75ce3a28d875880f2ebc2cd0d380..47c1810858938df3da52dd73f66f4b4ed6b2fddd 100644 (file)
@@ -1,9 +1,10 @@
 ! Copyright (C) 2008, 2010 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors calendar continuations debugger io
-io.directories io.sockets io.streams.string kernel mason.build
-mason.config mason.disk mason.email mason.notify mason.updates
-namespaces prettyprint threads ;
+io.directories io.pathnames io.sockets io.streams.string kernel
+make mason.build mason.common mason.config mason.disk
+mason.email mason.notify mason.updates namespaces prettyprint
+sequences threads ;
 IN: mason
 
 : heartbeat-loop ( -- )
@@ -37,7 +38,21 @@ IN: mason
 
     build-loop ;
 
+: check-host ( user host -- )
+    "@" glue [
+        scp-command get ,
+        "resource:LICENSE.txt" absolute-path ,
+        ":" append ,
+    ] { } make short-running-process ;
+
+: check-hosts ( -- )
+    docs-username get docs-host get check-host
+    branch-username get branch-host get check-host
+    package-username get package-host get check-host
+    image-username get image-host get check-host ;
+
 : run-mason ( -- )
+    check-hosts
     [ heartbeat-loop ] "Heartbeat loop" spawn
     [ build-loop ] "Build loop" spawn
     stop ;