From: vincent@cubedesigners.com Date: Thu, 8 Jun 2017 14:13:46 +0000 (+0000) Subject: Improve js & less compilation process on workshop, scripts to create & delete git... X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=98ea415fa15031d2a06cf659b38f0b06f7c019bb;p=cubeextranet.git Improve js & less compilation process on workshop, scripts to create & delete git branches for fluidbook players --- diff --git a/fluidbook/tools/fwstk/.idea/workspace.xml b/fluidbook/tools/fwstk/.idea/workspace.xml index b6a1204be..5cbb1e628 100644 --- a/fluidbook/tools/fwstk/.idea/workspace.xml +++ b/fluidbook/tools/fwstk/.idea/workspace.xml @@ -6,7 +6,12 @@ - + + + + + + @@ -43,11 +48,25 @@ - + - - + + + + + + + + + + + + + + + + @@ -110,6 +129,7 @@ @@ -148,8 +168,8 @@ - + @@ -193,7 +213,19 @@ - + + + + @@ -816,26 +849,6 @@ - - @@ -889,16 +897,9 @@ @@ -912,18 +913,10 @@ @@ -941,9 +934,45 @@ - + + + + + + + - @@ -1060,31 +1091,32 @@ - - + - + - + - + + + @@ -1132,12 +1164,66 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1166,6 +1252,18 @@ + + + + + + + + + + + + @@ -1184,7 +1282,11 @@ - + + + + + @@ -1234,7 +1336,11 @@ - + + + + + @@ -1284,7 +1390,11 @@ - + + + + + @@ -1316,18 +1426,64 @@ - + - - + + + + + + + + + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1382,8 +1538,20 @@ - - + + + + + + + + + + + + + + diff --git a/fluidbook/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar b/fluidbook/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar index b4d1bbadd..37d00eed7 100644 Binary files a/fluidbook/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar and b/fluidbook/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar differ diff --git a/fluidbook/tools/scour.php b/fluidbook/tools/scour.php index 647b43c7e..62f3af6fd 100644 --- a/fluidbook/tools/scour.php +++ b/fluidbook/tools/scour.php @@ -1,9 +1,6 @@ -#!/usr/local/bin/php +#!/usr/bin/php diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index 355c9e34c..35da09b3c 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -863,6 +863,44 @@ class wsMaintenance { return $res; } + public static function createBranch($args) { + commonDroits::min(5); + $branch = $args[0]; + + self::updateHTML5Sources(); + $playerDir = WS_COMPILE_ASSETS . '/player/'; + $branchesDir = $playerDir . 'branches/'; + $git = new CubeIT_CommandLine_Git($branchesDir . 'fluidbook-html5'); + echo $git->executeCmd('checkout -b ' . $branch); + $git = new CubeIT_CommandLine_Git($branchesDir . 'fluidbook-html5'); + echo $git->executeCmd('push --set-upstream origin ' . $branch); + self::updateHTML5Sources(); + $git = new CubeIT_CommandLine_Git($branchesDir . 'fluidbook-html5'); + echo $git->executeCmd('checkout master'); + } + + public static function deleteBranch($args) { + commonDroits::min(5); + $branch = trim($args[0]); + if ($branch == 'master' || !$branch) { + die('même pas en rêve'); + } + + self::updateHTML5Sources(); + + $playerDir = WS_COMPILE_ASSETS . '/player/'; + $branchesDir = $playerDir . 'branches/'; + $localDir = $playerDir . 'local/'; + + $git = new CubeIT_CommandLine_Git($branchesDir . 'fluidbook-html5'); + echo $git->executeCmd('push --delete origin ' . $branch); + + `rm -rf $localDir$branch`; + `rm -rf $branchesDir$branch`; + + self::updateHTML5Sources(); + } + public static function updateHTML5Sources($args = array(), $externals = true) { $playerDir = WS_COMPILE_ASSETS . '/player/'; $branchesDir = $playerDir . 'branches/'; @@ -871,6 +909,8 @@ class wsMaintenance { echo '
';
 		echo $git->executeCmd('pull --all');
 		$git = new CubeIT_CommandLine_Git($branchesDir . 'fluidbook-html5');
+		echo $git->executeCmd('fetch --all --prune');
+		$git = new CubeIT_CommandLine_Git($branchesDir . 'fluidbook-html5');
 		$b = $git->executeCmd('branch -r');
 		echo $b;
 		$bb = explode("\n", $b);
@@ -891,7 +931,7 @@ class wsMaintenance {
 		}
 		$branches = array_keys($branches);
 		foreach ($branches as $b) {
-			$git = $branchesDir . $b;
+			$gitsource = $branchesDir . $b;
 			$local = $localDir . $b;
 			echo '' . $b . '' . "\n";
 			if (!file_exists($branchesDir . $b)) {
@@ -900,7 +940,7 @@ class wsMaintenance {
 			}
 			if (!file_exists($local)) {
 				mkdir($local, 0777, true);
-				`cp -r $git/* $local`;
+				`cp -r $gitsource/* $local`;
 				`rm -rf $local/.git`;
 			}
 			$git = new CubeIT_CommandLine_Git($branchesDir . $b);
@@ -1221,4 +1261,6 @@ class wsMaintenance {
 		echo 'skip : ' . implode(', ', $skip) . '
'; echo 'error : ' . implode(', ', $error) . '
'; } + + } diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 1285813e8..c4c75180a 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -873,6 +873,7 @@ class wsHTML5Compiler { } if (file_exists($minimized)) { $mintime = filemtime($minimized); + $reminimize = false; } else { $mintime = 0; $reminimize = true; @@ -1341,6 +1342,7 @@ class wsHTML5Compiler { $tmp = CubeIT_Files::tmpdir(); copy($this->assets . '/style/variables.less', $tmp . '/variables.less'); + copy($this->assets . '/style/mixins.less', $tmp . '/mixins.less'); $bookVariables = array(); foreach ($variables as $k => $v) {