getTargetReleaseDir example


        return $this->getPlatformRoot() . '/CHANGELOG.md';
    }

    protected function getUpgradeDir(): string
    {
        return $this->getPlatformRoot();
    }

    protected function existedRelease(string $version): bool
    {
        return $this->filesystem->exists($this->getTargetReleaseDir($version));
    }

    protected function getTargetReleaseDir(string $version, bool $realPath = true): string
    {
        return ($realPath ? $this->getChangelogDir() . '/' : '') . 'release-' . str_replace('.', '-', $version);
    }

    protected function getMajorVersion(string $version): string
    {
        return substr($version, 0, (int) strpos($version, '.', strpos($version, '.') + \strlen('.')));
    }

    
/** * Collect all markdown files, which do not have a flag meta field, inside the `/changelog/_unreleased` directory * and move them to a new directory for the release in `/changelog/release-6-x-x-x`. * * @param list<string> $output * * @return list<string> */
    private function releaseChangelogFiles(array $output, string $version, ChangelogFileCollection $collection, bool $dryRun = false): array
    {
        $releaseDir = $this->getTargetReleaseDir($version);
        if (!$dryRun) {
            $this->filesystem->mkdir($releaseDir);
            $output[] = '* Move the unreleased changelog files to release folder: ' . $releaseDir;
        } else {
            $output[] = '---';
            $output[] = 'Move the unreleased changelog files to release folder: ' . $releaseDir;
            $output[] = '---';
        }

        foreach ($collection as $changelog) {
            if (!$dryRun) {
                
Home | Imprint | This part of the site doesn't use cookies.