1 | <?php |
||
26 | class BumpController extends \yii\console\Controller |
||
27 | { |
||
28 | public function actionIndex($version = null) |
||
29 | { |
||
30 | $config = Yii::$app->config; |
||
31 | $historyFile = $config->historyFile; |
||
32 | $changelogFile = $config->changelogFile; |
||
33 | $parser = Yii::createObject(MarkdownParser::class); |
||
34 | $history = $parser->parsePath($historyFile); |
||
35 | $gitlog = Yii::createObject(GitLogParser::class); |
||
36 | $gitlog->parseGitLog(); |
||
37 | $history->merge($gitlog->getHistory(), true); |
||
38 | $history->normalize(); |
||
39 | |||
40 | if ($version) { |
||
41 | if ($version === 'dev') { |
||
42 | $version = $history->lastTag; |
||
43 | } |
||
44 | $history->setFirstTag($version); |
||
45 | } |
||
46 | |||
47 | $historyRenderer = Yii::createObject(MarkdownRenderer::class); |
||
48 | $changelogRenderer = Yii::createObject(ChangelogMarkdownRenderer::class); |
||
49 | File::write($historyFile, $historyRenderer->render($history)); |
||
50 | File::write($changelogFile, $changelogRenderer->render($history)); |
||
51 | } |
||
52 | |||
53 | public function actionParse($path) |
||
62 | } |
||
63 |
This check looks for function calls that miss required arguments.