瀏覽代碼

Cambios menores.

Luciano Andrade 7 年之前
父節點
當前提交
633edb6d8e
共有 3 個文件被更改,包括 19 次插入8 次删除
  1. 6 3
      tools/src/Command/MakeSubversionCommand.php
  2. 11 3
      tools/src/Command/MakeVersionCommand.php
  3. 2 2
      tools/src/GetSource.php

+ 6 - 3
tools/src/Command/MakeSubversionCommand.php

@@ -41,10 +41,13 @@ class MakeSubversionCommand extends Command
                 $git = new Git();
                 $git_path = $dirname.'/'.$sec;
                 $git->setRepository($git_path);
-                $git->tag($version);
+                $git->tag->create($version);
+                $output->writeln("tag : $version created on ". $sec);
             } catch (GitException $e) {
-                $output->write($e->getMessage());
-                throw $e;
+                $output->writeln("tag : $version exists on ". $sec);
+
+                $git->tag->delete($version);
+                $git->tag->create($version);
             }
         }
     }

+ 11 - 3
tools/src/Command/MakeVersionCommand.php

@@ -11,6 +11,8 @@ use Symfony\Component\Console\Output\OutputInterface;
 use PHPGit\Git;
 use PHPGit\Exception\GitException;
 
+use WriteiniFile\WriteiniFile;
+
 class MakeVersionCommand extends Command
 {
     protected function configure()
@@ -42,11 +44,17 @@ class MakeVersionCommand extends Command
                 $git_path = $dirname.'/'.$sec;
                 $git->setRepository($git_path);
                 $git->branch->create($version);
-                $git->checkout($version);
+		$content[$sec]["branch"] = $version;
             } catch (GitException $e) {
-                $output->write($e->getMessage());
-                throw $e;
+                $output->writeln($sec . ": ".$e->getMessage());
+                $git->checkout($version);
+		$content[$sec]["branch"] = $version;
             }
         }
+
+	$ini = new WriteiniFile($realpath);
+	$ini->create($content);
+	$ini->write();
+
     }
 }

+ 2 - 2
tools/src/GetSource.php

@@ -46,8 +46,8 @@ class GetSource extends Command
 			$output->writeln($conf["url"]. " -> " . $git_path);
 			$git->clone($conf["url"], $git_path);
 		}catch (GitException $e){
-			throw $e;
-			$output->write("repo $sec exists \n");
+			//throw $e;
+			//$output->write("repo $sec exists \n");
 		}
 		$git->setRepository($git_path);