We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8d732a commit c8b6d48Copy full SHA for c8b6d48
src/tools/msvc/Solution.pm
@@ -499,6 +499,22 @@ EOF
499
last;
500
}
501
502
+ # Generate commit_id file
503
+ # If there is .git rewrite file whenever gitlog succeeds
504
+ if ( -d ".git" ) {
505
+ open P,"git log -1 --format='%h' |";
506
+ my $commit_id = <P>;
507
+ if (close(P)) {
508
+ open(O, ">src/include/commit_id.h");
509
+ print O "#define COMMIT_ID \"$commit_id\"\n";
510
+ close O;
511
+ }
512
+ } elsif (! -f "src/include/commit_id.h" ) {
513
+ # Otheriwse write file only if it not exists
514
515
+ print O "#define COMMIT_ID \"00000000\"\n";
516
517
518
519
open(O, ">doc/src/sgml/version.sgml")
520
|| croak "Could not write to version.sgml\n";
0 commit comments