Skip to content

Commit

Permalink
Custom PHAR prefix namespace with Git commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jul 26, 2021
1 parent 1e7ceae commit 1501229
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion compiler/build/scoper.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@
$stubs[] = $file->getPathName();
}

exec('git rev-parse --short HEAD', $gitCommitOutputLines, $gitExitCode);
if ($gitExitCode !== 0) {
die('Could not get Git commit');
}

return [
'prefix' => null,
'prefix' => sprintf('_PHPStan_%s', $gitCommitOutputLines[0]),
'finders' => [],
'files-whitelist' => $stubs,
'patchers' => [
Expand Down

0 comments on commit 1501229

Please sign in to comment.