Merge pull request #4043 from tianon/hack-git-detection-and-use

Add better ".git" detection and use
Upstream-commit: f794fbc2306e633916b7f000d441d234e198fc24
Component: engine
This commit is contained in:
Tianon Gravi
2014-02-13 09:56:14 -07:00
+2 -2
View File
@@ -53,9 +53,9 @@ DEFAULT_BUNDLES=(
)
VERSION=$(cat ./VERSION)
if [ -d .git ] && command -v git &> /dev/null; then
if command -v git &> /dev/null && git rev-parse &> /dev/null; then
GITCOMMIT=$(git rev-parse --short HEAD)
if [ -n "$(git status --porcelain)" ]; then
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
GITCOMMIT="$GITCOMMIT-dirty"
fi
elif [ "$DOCKER_GITCOMMIT" ]; then