Files
AI-on-the-edge-device/code/src/githash.cmd
2020-09-21 22:15:11 +02:00

8 lines
268 B
Batchfile

@echo off
FOR /F "tokens=* USEBACKQ" %%F IN (`git describe --dirty --always --tags`) DO (
SET var=%%F
)
ECHO #ifndef GITHASH_H > githash.h
ECHO #define GITHASH_H >> githash.h
ECHO const std::string kGitHash = "%var%"; >> githash.h
ECHO #endif // GITHASH_H >> githash.h