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 c64c94a commit f28c2b3Copy full SHA for f28c2b3
src/tools/msvc/Solution.pm
@@ -503,6 +503,22 @@ EOF
503
last;
504
}
505
506
+ # Generate commit_id file
507
+ # If there is .git rewrite file whenever gitlog succeeds
508
+ if ( -d ".git" ) {
509
+ open P,"git log -1 --format='%h' |";
510
+ my $commit_id = <P>;
511
+ if (close(P)) {
512
+ open(O, ">src/include/commit_id.h");
513
+ print O "#define COMMIT_ID \"$commit_id\"\n";
514
+ close O;
515
+ }
516
+ } elsif (! -f "src/include/commit_id.h" ) {
517
+ # Otheriwse write file only if it not exists
518
519
+ print O "#define COMMIT_ID \"00000000\"\n";
520
521
522
523
open(O, ">doc/src/sgml/version.sgml")
524
|| croak "Could not write to version.sgml\n";
0 commit comments