Skip to content
Snippets Groups Projects
Commit a451840f authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Git version indicates if dirty

parent 8658bfa1
No related branches found
No related tags found
No related merge requests found
...@@ -19,9 +19,9 @@ echo "#define PLUMED_VERSION_LONG \"$( ...@@ -19,9 +19,9 @@ echo "#define PLUMED_VERSION_LONG \"$(
echo "#define PLUMED_VERSION_GIT \"$( echo "#define PLUMED_VERSION_GIT \"$(
if test -d ../../.git && hash git 2> /dev/null ; then if test -d ../../.git && hash git 2> /dev/null ; then
# describe --tags gives a nive name # describe --tags gives a nice name
# in case it does not work, fallback to normal hash (12 char long) # in case it does not work, fallback to normal hash (12 char long)
git describe --tags || git rev-parse --short=12 HEAD git describe --long --tags --dirty --always || git rev-parse --short=12 HEAD
else else
echo "Unknown" echo "Unknown"
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment