Skip to content

Commit a61037b

Browse files
committed
Always reset docs to master after generation
When eg we support up to 8.5, then 8.5 was an alias for master and we ended up on master by default; but with 8.5 being released as stable, we want to pin it to a specific version - but even with 8.5 pinned to a specific version, we still want the docs to end up on master after the process is complete, so let's set it there explicitly instead of implicitly
1 parent 763cbbb commit a61037b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

generator/src/Commands/GenerateCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ protected function execute(
9191
$fileCreator->generateRectorFile($res->methods, "$genDir/rector-migrate.php");
9292
}
9393

94+
// always reset docs to master, even if the most-recently-supported-version
95+
// in $versions is pinned to a specific commit - this is so that at the end
96+
// of a `generate` run, we don't have docs stuck in the past
97+
$this->checkout(DocPage::referenceDir(), "master");
98+
9499
foreach (\array_keys($modules) as $moduleName) {
95100
$fileCreator->generateVersionSplitters($moduleName, FileCreator::getSafeRootDir() . "/generated/", \array_keys($versions));
96101
$fileCreator->createExceptionFile((string) $moduleName);

0 commit comments

Comments
 (0)