Skip to content

Commit

Permalink
utility.cpp: Add git commit hash to '-V' output if available.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools@5592 4ea69e1a-61f1-4043-bf83-b5c94c648137
  • Loading branch information
chrfranke committed Jan 17, 2024
1 parent 17b0a91 commit 8bacc97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ $Id$

2024-01-17 Christian Franke <[email protected]>

utility.cpp: Add git commit hash to '-V' output if available.

Set version information also for builds from GH R/O mirror.

Makefile.am: Move creation of svnversion.sh to ...
Expand Down
3 changes: 3 additions & 0 deletions utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ std::string format_version_info(const char * prog_name, int lines /* = 2 */)
#endif
#ifdef SMARTMONTOOLS_SVN_REV
"smartmontools SVN rev " SMARTMONTOOLS_SVN_REV
#ifdef SMARTMONTOOLS_GIT_HASH
" (git " SMARTMONTOOLS_GIT_HASH ")"
#endif
" dated " SMARTMONTOOLS_SVN_DATE " at " SMARTMONTOOLS_SVN_TIME "\n"
#else
"smartmontools SVN rev is unknown\n"
Expand Down

0 comments on commit 8bacc97

Please sign in to comment.