show release in log instead of branch (#1660)

Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
CaCO3
2022-12-21 21:26:52 +01:00
committed by GitHub
parent 0feeede406
commit 443bd67f81
3 changed files with 16 additions and 11 deletions

View File

@@ -38,6 +38,19 @@ const char* libfive_git_branch(void)
}
std::string getFwVersion(void) {
std::string buf;
if (std::string(GIT_TAG) == "") { // Tag not set, show branch
buf = "Development-Branch: " + std::string(GIT_BRANCH);
}
else { // Tag is set, ignore branch
buf = "Release: " + std::string(GIT_TAG);
}
buf = buf + " (Commit: " + std::string(GIT_REV) + ")";
return buf;
}
std::string getHTMLversion(void){
char buf[100]="?\0";
FILE* pFile;