1
0
Fork 0
mirror of synced 2024-06-28 19:20:25 +12:00
appwrite/build.sh

31 lines
792 B
Bash
Raw Normal View History

2019-05-09 18:54:39 +12:00
#!/bin/bash bash
RED='\033[0;31m'
NC='\033[0m' # No Color
echo "Updating git repository"
git fetch origin
git reset --hard origin/master
2019-10-05 04:04:36 +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 "Setting Version #"
2019-10-01 17:57:41 +13:00
echo -e "<?php\n\nconst VERSION = '$1';\n\nreturn VERSION;" > app/config/version.php
2019-05-09 18:54:39 +12:00
echo 'Updating PHP dependencies and auto-loading...'
2019-08-19 20:20:02 +12:00
composer update --ignore-platform-reqs --optimize-autoloader --no-dev --no-plugins --no-scripts --prefer-dist
2019-05-09 18:54:39 +12:00
echo 'Starting build...'
2019-10-05 04:04:36 +13:00
docker build -t appwrite/appwrite:"$1" .
2019-05-09 18:54:39 +12:00
echo 'Pushing build to registry...'
2019-10-05 04:04:36 +13:00
docker push appwrite/appwrite:"$1"