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

Commitf28c2b3

Browse files
committed
Generation of commit_id.h for windows build
1 parentc64c94a commitf28c2b3

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
@@ -503,6 +503,22 @@ EOF
503503
last;
504504
}
505505
}
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+
open(O,">src/include/commit_id.h");
519+
print O"#define COMMIT_ID\"00000000\"\n";
520+
close O;
521+
}
506522

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp