2020-05-26 20:09:02 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
|
|
|
|
if [ -z $RESTARTED ]
|
|
|
|
then
|
|
|
|
|
|
|
|
echo "# pull newest bigblugbutton-docker.git"
|
2020-06-06 14:39:31 +02:00
|
|
|
git pull
|
2020-05-26 20:09:02 +02:00
|
|
|
|
|
|
|
# restart script, since it might have changed.
|
|
|
|
RESTARTED=1 ./scripts/upgrade
|
|
|
|
|
|
|
|
else
|
2020-07-30 12:11:34 +02:00
|
|
|
# update changed environment variable
|
|
|
|
sed -i 's/EXTERNAL_IP=/EXTERNAL_IPv4=/' .env
|
|
|
|
|
2020-05-26 20:09:02 +02:00
|
|
|
echo ""
|
2020-10-21 22:13:37 +02:00
|
|
|
echo "# pull newest git submodules"
|
|
|
|
git submodule init
|
|
|
|
git submodule update
|
2020-05-26 20:09:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "# pull newest images"
|
2020-06-06 14:39:31 +02:00
|
|
|
./scripts/compose pull
|
2020-05-26 20:09:02 +02:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "# rebuild images"
|
2020-06-07 12:15:05 +02:00
|
|
|
|
2020-07-30 12:11:34 +02:00
|
|
|
# rebuild everything which got modified
|
|
|
|
./scripts/compose build --pull
|
2020-05-26 20:09:02 +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 ""
|
2020-06-06 14:39:31 +02:00
|
|
|
echo "use following command for restarting:"
|
|
|
|
echo " $ ./scripts/compose up -d"
|
2020-05-26 20:09:02 +02:00
|
|
|
echo "-------------------------------------"
|
|
|
|
fi
|