Skip to content

Commit 1501229

Browse files
committed
Custom PHAR prefix namespace with Git commit
1 parent 1e7ceae commit 1501229

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

compiler/build/scoper.inc.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@
2323
$stubs[] = $file->getPathName();
2424
}
2525

26+
exec('git rev-parse --short HEAD', $gitCommitOutputLines, $gitExitCode);
27+
if ($gitExitCode !== 0) {
28+
die('Could not get Git commit');
29+
}
30+
2631
return [
27-
'prefix' => null,
32+
'prefix' => sprintf('_PHPStan_%s', $gitCommitOutputLines[0]),
2833
'finders' => [],
2934
'files-whitelist' => $stubs,
3035
'patchers' => [

0 commit comments

Comments
 (0)