51 lines
1.3 KiB
Bash
51 lines
1.3 KiB
Bash
|
#!/usr/bin/env sh
|
||
|
|
||
|
# Author: Sven Vogel
|
||
|
# Created: 17.05.2024
|
||
|
# Description: Builds the Dockerfile for SDK and DEVKIT
|
||
|
|
||
|
echo "+--------------------------------------+"
|
||
|
echo "| CHECKING prelude |"
|
||
|
echo "+--------------------------------------+"
|
||
|
|
||
|
source ./.env
|
||
|
|
||
|
if [ -z "$SDK" ]; then
|
||
|
echo "no SDK specified"
|
||
|
exit 1
|
||
|
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 "+--------------------------------------+"
|
||
|
|
||
|
docker run -it servostar/gemstone:devkit-"$SDK" sh run-check-test.sh
|
||
|
if [ ! $? -eq 0 ]; then
|
||
|
echo "===> failed to build devkit"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
echo "+--------------------------------------+"
|
||
|
echo "| DONE |"
|
||
|
echo "+--------------------------------------+"
|