mirror of
https://github.com/chillout2k/sos-milter.git
synced 2025-12-11 01:30:19 +00:00
29 lines
570 B
Bash
Executable File
29 lines
570 B
Bash
Executable File
#!/bin/sh
|
|
|
|
BRANCH="$(/usr/bin/git branch|/bin/grep \*|/usr/bin/awk {'print $2'})"
|
|
VERSION="$(/bin/cat VERSION)"
|
|
BASEOS="$(/bin/cat BASEOS)"
|
|
GO=""
|
|
|
|
while getopts g opt
|
|
do
|
|
case $opt in
|
|
g) GO="go";;
|
|
esac
|
|
done
|
|
|
|
if [ -z "${GO}" ] ; then
|
|
echo "Building sos-milter@docker on '${BASEOS}' for version '${VERSION}' in branch '${BRANCH}'!"
|
|
echo "GO serious with '-g'!"
|
|
exit 1
|
|
fi
|
|
|
|
IMAGES="sos-milter"
|
|
|
|
for IMAGE in ${IMAGES}; do
|
|
/usr/bin/docker build \
|
|
--pull=true \
|
|
-t "${IMAGE}/${BASEOS}:${VERSION}_${BRANCH}" \
|
|
-f "docker/${BASEOS}/Dockerfile" .
|
|
done
|