run() !== \RectorPrefix20220527\Symfony\Component\Console\Command\Command::SUCCESS) { throw new \Rector\Core\Exception\VersionException('You must ensure to run compile from composer git repository clone and that git binary is available.'); } $tag = \trim($pointsAtProcess->getOutput()); if ($tag !== '' && $tag !== '0') { return $tag; } $process = new \RectorPrefix20220527\Symfony\Component\Process\Process([self::GIT, 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__); if ($process->run() !== \RectorPrefix20220527\Symfony\Component\Console\Command\Command::SUCCESS) { throw new \Rector\Core\Exception\VersionException('You must ensure to run compile from composer git repository clone and that git binary is available.'); } $version = \trim($process->getOutput()); return \trim($version, '"'); } public static function resolverReleaseDateTime() : \DateTime { $process = new \RectorPrefix20220527\Symfony\Component\Process\Process([self::GIT, 'log', '-n1', '--pretty=%ci', 'HEAD'], __DIR__); if ($process->run() !== \RectorPrefix20220527\Symfony\Component\Console\Command\Command::SUCCESS) { throw new \Rector\Core\Exception\VersionException('You must ensure to run compile from composer git repository clone and that git binary is available.'); } return new \DateTime(\trim($process->getOutput())); } }