-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
24 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@echo off | ||
|
||
rem Change to the directory where your header should be generated | ||
cd /d "src" | ||
|
||
rem Get the current short Git revision | ||
for /f "delims=" %%i in ('git rev-parse --short HEAD') do set GIT_REVISION=%%i | ||
|
||
rem Create the version header file | ||
echo // This file is generated automatically > version.h | ||
echo #define GIT_REVISION "%GIT_REVISION%" >> version.h | ||
|
||
rem Optional: print a message | ||
echo Version header generated with GIT revision: %GIT_REVISION% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// This file is generated automatically | ||
#define GIT_REVISION "70d9c2af" |