@echo off echo current time is %date% %time% echo get git sha echo. for /f "delims=" %%i in ('git rev-parse HEAD') do set git_head=%%i echo git sha=%git_head% echo git sha_short=%git_head:~0,10% echo #ifndef _ONE_CHIP_GITINF_H > ../BoardInterface/one_chip_git_inf.h echo #define _ONE_CHIP_GITINF_H >> ../BoardInterface/one_chip_git_inf.h echo #define ONE_CHIP_GIT_SHA "%git_head%">> ../BoardInterface/one_chip_git_inf.h echo #define ONE_CHIP_GIT_SHA_SHORT "%git_head:~0,10%">> ../BoardInterface/one_chip_git_inf.h echo #endif >> ../BoardInterface/one_chip_git_inf.h