Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc8b6d48

Browse files
committed
Generation of commit_id.h for windows build
1 parentf8d732a commitc8b6d48

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎src/tools/msvc/Solution.pm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,22 @@ EOF
499499
last;
500500
}
501501
}
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+
open(O,">src/include/commit_id.h");
515+
print O"#define COMMIT_ID\"00000000\"\n";
516+
close O;
517+
}
502518

503519
open(O,">doc/src/sgml/version.sgml")
504520
|| croak"Could not write to version.sgml\n";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp