add branch info #56

develop
Geoffrey Merck 7 months ago
parent 8c11c98669
commit 97a3a69c67

@ -3,10 +3,12 @@ ifneq ("$(wildcard ../.git/index)","")
@echo "#pragma once" > /tmp/$@ @echo "#pragma once" > /tmp/$@
@echo "#include <string>" >> /tmp/$@ @echo "#include <string>" >> /tmp/$@
@echo "const std::string gitversion(\"$(shell git rev-parse --short HEAD)\");" >> /tmp/$@ @echo "const std::string gitversion(\"$(shell git rev-parse --short HEAD)\");" >> /tmp/$@
@echo "const std::string gitBranch(\"$(shell git branch --show-current)\");" >> /tmp/$@
else else
@echo "#pragma once" > /tmp/$@ @echo "#pragma once" > /tmp/$@
@echo "#include <string>" >> /tmp/$@ @echo "#include <string>" >> /tmp/$@
@echo "const std::string gitversion(\"0000000\");" >> /tmp/$@ @echo "const std::string gitversion(\"0000000\");" >> /tmp/$@
@echo "const std::string gitBranch(\"UNKNOWN BRANCH\");" >> /tmp/$@
endif endif
@cmp -s /tmp/$@ $@; \ @cmp -s /tmp/$@ $@; \
RETVAL=$$?; \ RETVAL=$$?; \

@ -28,5 +28,5 @@ const std::string PRODUCT_NAME("DStarGateway");
const std::string VENDOR_NAME("Geoffrey Merck F4FXL / KC3FRA and Contributors"); const std::string VENDOR_NAME("Geoffrey Merck F4FXL / KC3FRA and Contributors");
const std::string VERSION("1.0"); const std::string VERSION("1.0");
const std::string LONG_VERSION = VERSION + "-" + gitversion; const std::string LONG_VERSION = VERSION + "-" + gitversion;
const std::string FULL_PRODUCT_NAME = PRODUCT_NAME + " v" + VERSION + "-" + gitversion; const std::string FULL_PRODUCT_NAME = PRODUCT_NAME + " v" + VERSION + "-" + gitversion + "-" + gitBranch;
const std::string SHORT_PRODUCT_NAME = "DStarGW v" + VERSION + "-" + gitversion; const std::string SHORT_PRODUCT_NAME = "DStarGW v" + VERSION + "-" + gitversion;

Loading…
Cancel
Save

Powered by TurnKey Linux.