2022-05-08 20:40:34 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
|
|
|
|
if [ -z $RESTARTED ]
|
|
|
|
then
|
|
|
|
|
|
|
|
echo "# pull newest bigblugbutton-docker.git"
|
|
|
|
git pull
|
|
|
|
|
|
|
|
# restart script, since it might have changed.
|
|
|
|
RESTARTED=1 ./scripts/upgrade-and-build
|
|
|
|
exit
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "# pull newest git submodules"
|
2023-01-10 17:19:35 +01:00
|
|
|
./scripts/checkout-submodules
|
2022-05-08 20:40:34 +02:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "# recreate docker-compose.yml"
|
|
|
|
./scripts/generate-compose
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "# pull newest images"
|
2023-05-07 11:07:09 +02:00
|
|
|
docker compose pull --ignore-pull-failures
|
2022-05-08 20:40:34 +02:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "# rebuild images"
|
|
|
|
docker build -t alangecker/bbb-docker-base-java:latest mod/base-java
|
|
|
|
|
|
|
|
# rebuild everything which got modified
|
2023-05-07 11:07:09 +02:00
|
|
|
docker compose build
|
2022-05-08 20:40:34 +02:00
|
|
|
|
|
|
|
COMMIT_HASH=$(git rev-parse --short HEAD)
|
|
|
|
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "-------------------------------------"
|
|
|
|
echo "images successfully rebuilt!"
|
|
|
|
echo "we are on $COMMIT_HASH ($BRANCH_NAME)"
|
|
|
|
echo ""
|
|
|
|
echo "use following command for restarting bbb:"
|
2023-05-07 11:07:09 +02:00
|
|
|
echo " $ docker compose up -d"
|
2022-05-08 20:40:34 +02:00
|
|
|
echo "-------------------------------------"
|
|
|
|
fi
|