From b1cd49114adf210c85b44cacf5c1eeb2d3b6ae77 Mon Sep 17 00:00:00 2001
From: hahn <axel.hahn@iml.unibe.ch>
Date: Thu, 21 Nov 2013 17:46:15 +0100
Subject: [PATCH] - fixed: cron deployment

---
 shellscripts/cron_deployment.php | 42 +++++++++++++++-----------------
 1 file changed, 19 insertions(+), 23 deletions(-)

diff --git a/shellscripts/cron_deployment.php b/shellscripts/cron_deployment.php
index 2e6dc9d2..b0853ccb 100644
--- a/shellscripts/cron_deployment.php
+++ b/shellscripts/cron_deployment.php
@@ -1,23 +1,19 @@
-<?php
-
-
-// http://iml:deployment@ci.iml.unibe.ch/deployment/?prj=ci&action=deploy&par3=preview&confirm=1
-
-    $sDocroot=(dirname(__dir__)) . "/public_html";
-    require_once("$sDocroot/deployment/config/inc_projects_config.php");
-    require_once("$sDocroot/deployment/classes/project.class.php");
-    
-    echo "<h1>===== IMLDEPLOYMENT - deploy all projects =====</h1>\n";
-    foreach ($aProjects as $sPrj=>$aData){
-        $oPrj=new project($sPrj);
-        
-        foreach (array_keys($aConfig["phases"]) as $sPhase){
-            if ($oPrj->isActivePhase($sPhase)) {
-                echo $oPrj->deploy($sPhase);
-            } else {
-                echo "SKIP: phase $sPhase is not active in project ".$oPrj->getLabel().".<br>\n";
-            }
-        }
-        echo "<br>\n";
-    }
-    echo "done\n";
\ No newline at end of file
+<?php
+
+// http://iml:deployment@ci.iml.unibe.ch/deployment/?prj=ci&action=deploy&par3=preview&confirm=1
+
+$sDocroot = (dirname(__dir__)) . "/public_html";
+require_once("$sDocroot/deployment/classes/project.class.php");
+
+$oPrj1 = new project();
+
+echo "<h1>===== IMLDEPLOYMENT - deploy all projects =====</h1>\n";
+foreach ($oPrj1->getProjects() as $sPrj) {
+    $oPrj = new project($sPrj);
+
+    foreach ($oPrj->getActivePhases() as $sPhase) {
+        echo $oPrj->deploy($sPhase);
+    }
+    echo "<br>\n";
+}
+echo "done\n";
-- 
GitLab