diff --git a/determineVersion.sh b/determineVersion.sh index 7c5f1de..3d80d9d 100755 --- a/determineVersion.sh +++ b/determineVersion.sh @@ -1,3 +1,6 @@ #!/bin/bash - -(git describe --tags 2>/dev/null || pwd | sed -e "s/.*\\///" | sed -e "s/[^-]*//") | tail -c +2 +if [ $(git rev-parse --show-toplevel 2>/dev/null) == $(pwd) ]; then + git describe --tags 2>/dev/null | tail -c +2 +else + pwd | sed -e "s/.*\\///" | sed -e "s/[^-]*//" | tail -c +2 +fi