瀏覽代碼

Arreglo cuando el branch no posee el formato vX.Y.Z

gabriel 7 年之前
父節點
當前提交
938c72e8d8
共有 2 個文件被更改,包括 14 次插入6 次删除
  1. 7 3
      tools/src/UpdateFlowdatCommand.php
  2. 7 3
      tools/src/UpdateFlowdatModulesCommand.php

+ 7 - 3
tools/src/UpdateFlowdatCommand.php

@@ -30,9 +30,13 @@ class UpdateFlowdatCommand extends Command
         $remote = $input->getArgument("remote");
 	$tag  = strtolower($input->getArgument("tag")) === 'true';
 
-	$values = explode('.', $version);
-	unset ($values[count($values) - 1]);
-	$versionOnly = implode ('.', $values);
+        if (substr($version, 0, 1) === 'v') {
+            $values = explode('.', $version);
+            unset ($values[count($values) - 1]);
+            $versionOnly = implode ('.', $values);
+        } else {
+            $versionOnly = $values;
+        }
 
         $realpath = realpath(".");
         $dir = dirname($realpath);

+ 7 - 3
tools/src/UpdateFlowdatModulesCommand.php

@@ -31,9 +31,13 @@ class UpdateFlowdatModulesCommand extends Command
         $tag  = strtolower($input->getArgument("tag")) === 'true';
 
 	if ($tag) {
-            $values = explode('.', $version);
-            unset ($values[count($values) - 1]);
-            $versionOnly = implode ('.', $values);
+            if (substr($version, 0, 1) === 'v') {
+                $values = explode('.', $version);
+                unset ($values[count($values) - 1]);
+                $versionOnly = implode ('.', $values);
+            } else {
+                $versionOnly = $values;
+            }
 	} else {
             $versionOnly = $version;
 	}