2024-05-17 13:39:07 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
# Author: Sven Vogel
|
|
|
|
# Created: 17.05.2024
|
|
|
|
# Description: Builds the Dockerfile for SDK and DEVKIT
|
|
|
|
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
echo "| CHECKING prelude |"
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
|
2024-05-17 13:53:27 +00:00
|
|
|
if [ -z "$SDK" ]; then
|
|
|
|
echo "no SDK specified, sourcing .env"
|
|
|
|
source ./.env
|
2024-05-17 13:39:07 +00:00
|
|
|
|
2024-05-17 14:02:40 +00:00
|
|
|
if [ -z "$SDK" ]; then
|
|
|
|
echo "no SDK specified"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "using SDK $SDK"
|
|
|
|
fi
|
|
|
|
|
|
|
|
else
|
|
|
|
echo "using SDK $SDK"
|
2024-05-17 13:39:07 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
echo "| BUILDING SDK |"
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
|
|
|
|
docker build --tag servostar/gemstone:sdk-"$SDK" sdk/.
|
|
|
|
if [ ! $? -eq 0 ]; then
|
|
|
|
echo "===> failed to build sdk"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
echo "| BUILDING DEVKIT |"
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
|
|
|
|
docker build --tag servostar/gemstone:devkit-"$SDK" .
|
|
|
|
if [ ! $? -eq 0 ]; then
|
|
|
|
echo "===> failed to build devkit"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
echo "| RUNNING check test |"
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
|
2024-05-27 19:22:06 +00:00
|
|
|
docker run --rm --name "devkit-$SDK-check-test"- servostar/gemstone:devkit-"$SDK" sh run-check-test.sh
|
2024-05-17 13:39:07 +00:00
|
|
|
if [ ! $? -eq 0 ]; then
|
2024-05-18 10:52:00 +00:00
|
|
|
echo "===> failed to run build or checks"
|
2024-05-17 13:39:07 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
echo "| DONE |"
|
|
|
|
echo "+--------------------------------------+"
|