2019-05-09 18:54:39 +12:00
|
|
|
#!/bin/bash bash
|
|
|
|
|
|
|
|
RED='\033[0;31m'
|
|
|
|
NC='\033[0m' # No Color
|
|
|
|
|
2019-12-08 10:20:33 +13:00
|
|
|
echo "Updating git repository $1 / $2"
|
2019-05-09 18:54:39 +12:00
|
|
|
|
|
|
|
git fetch origin
|
|
|
|
git reset --hard origin/master
|
|
|
|
|
2019-10-03 02:55:55 +13:00
|
|
|
if test $(find "./app/db/GeoLite2/GeoLite2-Country.mmdb" -mmin +259200)
|
2019-05-09 18:54:39 +12:00
|
|
|
then
|
|
|
|
printf "${RED}GEO country DB has not been updated for more than 6 months. Go to https://dev.maxmind.com/geoip/geoip2/geolite2/ for more info${NC}\n"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo 'Starting build...'
|
|
|
|
|
2019-12-08 10:20:33 +13:00
|
|
|
docker build --build-arg VERSION="$2" --tag appwrite/appwrite:"$1" .
|
2019-05-09 18:54:39 +12:00
|
|
|
|
|
|
|
echo 'Pushing build to registry...'
|
|
|
|
|
2019-10-03 02:55:55 +13:00
|
|
|
docker push appwrite/appwrite:"$1"
|