getTargetUpgradeFile example

$upgrade = $changelog->getDefinition()->getUpgradeInformation();
            if ($upgrade) {
                $append[] = $upgrade;
            }
        }
        if (!\count($append)) {
            return $output;
        }

        array_unshift($appendsprintf('# %s', $version));

        $upgradeFile = $this->getTargetUpgradeFile($version);
        if (!$dryRun) {
            if (!$this->filesystem->exists($upgradeFile)) {
                $this->filesystem->touch($upgradeFile);
            }

            $content = file_get_contents($upgradeFile) ?: '';

            $posLatestRelease = strpos($content, '# ');
            $posLatestRelease = $posLatestRelease ?: 0;

            $content
                =
Home | Imprint | This part of the site doesn't use cookies.