Merge pull request #279 from BubuOT/version_fix
determineVersion.sh: prevent traversing into outer git repo for git-describe call
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
if [ $(git rev-parse --show-toplevel 2>/dev/null) == $(pwd) ]; then
|
||||||
(git describe --tags 2>/dev/null || pwd | sed -e "s/.*\\///" | sed -e "s/[^-]*//") | tail -c +2
|
git describe --tags 2>/dev/null | tail -c +2
|
||||||
|
else
|
||||||
|
pwd | sed -e "s/.*\\///" | sed -e "s/[^-]*//" | tail -c +2
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user