|
@@ -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();
|
|
|
+
|
|
|
}
|
|
|
}
|