szurubooru/client/hooks/build

12 lines
347 B
Text
Raw Normal View History

2019-09-28 22:49:01 +02:00
#!/bin/sh
2019-09-29 01:28:04 +02:00
CLOSEST_VER=$(git describe --tags --abbrev=0)
if git describe --exact-match --abbrev=0 2> /dev/null; then
BUILD_INFO="v${CLOSEST_VER}"
else
BUILD_INFO="v${CLOSEST_VER}-edge-$(echo $SOURCE_COMMIT | cut -c1-7)"
fi
echo "Using BUILD_INFO=$BUILD_INFO"
docker build --build-arg BUILD_INFO=$BUILD_INFO -f $DOCKERFILE_PATH -t $IMAGE_NAME .