Include "~docker" in version if built on Docker.

This commit is contained in:
Joachim Bauch 2023-11-15 09:53:38 +01:00
parent a2faf3dc95
commit 4b019a991f
No known key found for this signature in database
GPG key ID: 77C1D22D53E15F02

View file

@ -15,6 +15,11 @@ if [ -z "$VERSION" ] && [ -d "$ROOT/../.git" ]; then
else
VERSION=$(git log -1 --pretty=%H)
fi
if [ -f "/.dockerenv" ]; then
VERSION="$VERSION~docker"
elif grep -sq 'docker\|lxc' /proc/1/cgroup; then
VERSION="$VERSION~docker"
fi
fi
if [ -z "$VERSION" ]; then