|
@@ -66,9 +66,8 @@ class TagVendorsCommand extends Command
|
|
|
$branchs = $git->branch(['all' => true]);
|
|
|
$findBranch = false;
|
|
|
$branchRemote = null;
|
|
|
+
|
|
|
// verifico si el branch a crear ya existe
|
|
|
- if ($sec == 'webservice')
|
|
|
- var_dump($branchs);
|
|
|
foreach ($branchs as $branch) {
|
|
|
if (strpos($branch['name'], $version) !== false) {
|
|
|
$findBranch = true;
|
|
@@ -80,28 +79,16 @@ class TagVendorsCommand extends Command
|
|
|
// si no existe el branch y estoy creando un branch nuevo
|
|
|
$git->branch->create($version);
|
|
|
$cmd .= "$version ";
|
|
|
- if ($sec == 'webservice')
|
|
|
-
|
|
|
-var_dump('creando branch----------------------');
|
|
|
-
|
|
|
}
|
|
|
+
|
|
|
$git->checkout($version);
|
|
|
if (!$optionBranch) {
|
|
|
// estoy creando un tag
|
|
|
$tags = $git->tag();
|
|
|
- if ($sec == 'webservice') {
|
|
|
- var_dump('------------------------------------------');
|
|
|
- var_dump($tag, $tags, $version, $branchRemote);
|
|
|
- }
|
|
|
|
|
|
if (!in_array($tag, $tags)) {
|
|
|
// el tag no existe
|
|
|
- if ($sec == 'webservice')
|
|
|
- var_dump('No existe el tag');
|
|
|
if ($branchRemote == null) {
|
|
|
- if ($sec == 'webservice')
|
|
|
-
|
|
|
- var_dump('$branchRemote-**************************');
|
|
|
// el branch remote no existe
|
|
|
$git->tag->create($tag, $version);
|
|
|
} else {
|
|
@@ -111,12 +98,10 @@ var_dump('creando branch----------------------');
|
|
|
}
|
|
|
$cmd .= " --tags";
|
|
|
}
|
|
|
+
|
|
|
// ejecuto el comando git
|
|
|
- if ($sec == 'webservice') {
|
|
|
- var_dump($cmd);
|
|
|
- shell_exec($cmd);
|
|
|
- }
|
|
|
- // sleep(5);
|
|
|
+ shell_exec($cmd);
|
|
|
+ sleep(5);
|
|
|
} catch (GitException $e) {
|
|
|
$output->writeln($e->getTraceAsString());
|
|
|
$output->writeln($sec . ": " . $e->getMessage());
|