Commit ab60172d authored by Angus Lepper's avatar Angus Lepper
Browse files

Ensure GIT_BRANCH non-empty when not on a branch

parent 1a8b0e63
......@@ -63,7 +63,7 @@ libswiftsim_mpi_la_SHORTNAME = mpi
version.h: $(AM_SOURCES) $(include_HEADERS) $(noinst_HEADERS)
if test "X$(GIT_CMD)" != "X"; then \
GIT_REVISION=`$(GIT_CMD) describe --abbrev=8 --always --tags --dirty`; \
GIT_BRANCH=`$(GIT_CMD) symbolic-ref HEAD| sed 's,.*/,,'`; \
GIT_BRANCH=`$(GIT_CMD) branch | sed -n 's/^\* \(.*\)/\1/p'`; \
-e "s,@GIT_BRANCH\@,$${GIT_BRANCH}," > version.h; \
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment