[svn-genapp] r1704 - in genappalpha/languages: . html5/seedmelab html5/util

svn@...
 

Author: ehb
Date: Tue Jul 23 16:19:58 2019
New Revision: 1704

Log:
Seedme integration working

Modified:
genappalpha/languages/html5.json
genappalpha/languages/html5/seedmelab/syncfilesdirs.php
genappalpha/languages/html5/util/jobrun.php

Modified: genappalpha/languages/html5.json
==============================================================================
--- genappalpha/languages/html5.json Tue Jul 23 13:28:37 2019 (r1703)
+++ genappalpha/languages/html5.json Tue Jul 23 16:19:58 2019 (r1704)
@@ -538,6 +538,21 @@
,{ "add/js/ga.min.js" : "once" }
]
}
+ ,{
+ "frequency" : "once",
+ "output" : "seedmelab/syncfilesdirs.php",
+ "inputs" : [
+ { "seedmelab/syncfilesdirs.php" : "once" }
+ ]
+ }
+ ,{
+ "frequency" : "once",
+ "output" : "seedmelab/foldershare",
+ "setexecutable" : "true",
+ "inputs" : [
+ { "seedmelab/foldershare" : "once" }
+ ]
+ }
]
}


Modified: genappalpha/languages/html5/seedmelab/syncfilesdirs.php
==============================================================================
--- genappalpha/languages/html5/seedmelab/syncfilesdirs.php Tue Jul 23 13:28:37 2019 (r1703)
+++ genappalpha/languages/html5/seedmelab/syncfilesdirs.php Tue Jul 23 16:19:58 2019 (r1704)
@@ -2,6 +2,7 @@
;

$debug = 0;
+$debug2file = "/tmp/seedmelabsync.log";

$notes = <<<__EOD
usage: php $argv[0] {-r} --user username --project project_name
@@ -29,7 +30,7 @@
$results = (object) [];

$user = $options[ "user" ];
-$project = $options[ "project" ];
+$project = isset( $options[ "project" ] ) ? $options[ "project" ] : "";

# setup variables

@@ -130,8 +131,13 @@

function debugecho ( $str, $level = 1 ) {
global $debug;
+ global $debug2file;
if ( $debug >= $level ) {
- echo $str . "\n";
+ if ( isset( $debug2file ) ) {
+ error_log( "$str\n", 3, $debug2file );
+ } else {
+ echo $str . "\n";
+ }
}
}


Modified: genappalpha/languages/html5/util/jobrun.php
==============================================================================
--- genappalpha/languages/html5/util/jobrun.php Tue Jul 23 13:28:37 2019 (r1703)
+++ genappalpha/languages/html5/util/jobrun.php Tue Jul 23 16:19:58 2019 (r1704)
@@ -103,7 +103,7 @@
logstoprunning();
__~debug:runjob{error_log( "jobrun 15\n", 3, "/tmp/php_errors" );}

-
+__~seedmelab:url{$seedmecmd="php __docroot:html5__/__application__/seedmelab/syncfilesdirs.php --user " . $GLOBALS['logon']; exec("$seedmecmd >> /tmp/php_errors 2>&1 & echo $!; " );}

if ( !$GLOBALS[ 'wascancelled' ] ) {
$results = str_replace( "__docroot:html5__/__application__/", "", $results );

Join genapp-commits@groups.io to automatically receive all group messages.