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:
commit
f794fbc230
1 changed files with 2 additions and 2 deletions
|
@ -53,9 +53,9 @@ DEFAULT_BUNDLES=(
|
||||||
)
|
)
|
||||||
|
|
||||||
VERSION=$(cat ./VERSION)
|
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)
|
GITCOMMIT=$(git rev-parse --short HEAD)
|
||||||
if [ -n "$(git status --porcelain)" ]; then
|
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
|
||||||
GITCOMMIT="$GITCOMMIT-dirty"
|
GITCOMMIT="$GITCOMMIT-dirty"
|
||||||
fi
|
fi
|
||||||
elif [ "$DOCKER_GITCOMMIT" ]; then
|
elif [ "$DOCKER_GITCOMMIT" ]; then
|
||||||
|
|
Loading…
Reference in a new issue