clboss/generate_commit_hash.sh
Ken Sedgwick 44476241d1 Improve the logged version string and add clboss-status "info"
The logged version now looks like:
plugin-clboss: clboss v0.13.2 (v0.13.2-rc1-3-g44832e2)

A new "info" chunk is added to clboss-status:
   "info": {
      "version": "v0.13.2",
      "git_commit_hash": "44832e2258069641a6149bdc90b7e5fc12219f77",
      "git_describe": "v0.13.2-rc1-3-g44832e2"
   },
2024-07-24 11:21:41 -07:00

4 lines
245 B
Bash
Executable file

# generate_commit_hash.sh
echo "#pragma once" > commit_hash.h
echo "#define GIT_COMMIT_HASH \"$(git rev-parse HEAD)\"" >> commit_hash.h
echo "#define GIT_DESCRIBE \"$(git describe --tags --long --always --match=v*.* --dirty)\"" >> commit_hash.h