1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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

Add better ".git" detection and use
This commit is contained in:
Tianon Gravi 2014-02-13 09:56:14 -07:00
commit f794fbc230

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