]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5437 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 7 Sep 2022 08:21:26 +0000 (10:21 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 7 Sep 2022 08:21:26 +0000 (10:21 +0200)
app/Models/Traits/FluidbookPlayerBranches.php

index 132abf3862ce4351cfe8f79674aac1e2c85b71e5..5ae5484ea96f534095301019a5ee8fe7344f4bbf 100644 (file)
@@ -43,8 +43,9 @@ trait FluidbookPlayerBranches
         return json_decode(file_get_contents($cacheFile));
     }
 
-    protected static function reposDirectory(){
-        return self::getFluidbookPlayerBaseDirectory().'repos/fluidbook-html5';
+    protected static function reposDirectory()
+    {
+        return self::getFluidbookPlayerBaseDirectory() . 'repos/fluidbook-html5';
     }
 
     protected function fluidbookCreateBranch($branch)
@@ -92,6 +93,8 @@ trait FluidbookPlayerBranches
 
         $git = new Git($repos);
         $branches = $git->listBranches();
+        file_put_contents($playerDir . '/activebranches', json_encode($branches));
+
         foreach ($branches as $b) {
             $gitsource = $branchesDir . $b;
             $local = $localDir . $b;
@@ -105,7 +108,5 @@ trait FluidbookPlayerBranches
             }
             $this->executeGitCommands($branchesDir . $b, ['reset --hard origin/' . $b, 'pull']);
         }
-        file_put_contents($playerDir . '/activebranches', json_encode($branches));
     }
-
 }