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
|
|
|
|
|
2018-08-30 16:16:01 +02:00
|
|
|
echo "Using BUILD_INFO=$BUILD_INFO"
|
|
|
|
docker build --build-arg BUILD_INFO=$BUILD_INFO -f $DOCKERFILE_PATH -t $IMAGE_NAME .
|