forked from appwrite/appwrite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
30 lines (18 loc) Β· 792 Bytes
/
build.sh
File metadata and controls
30 lines (18 loc) Β· 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash bash
RED='\033[0;31m'
NC='\033[0m' # No Color
echo "Updating git repository"
git fetch origin
git reset --hard origin/master
if test $(find "./app/db/GeoLite2/GeoLite2-Country.mmdb" -mmin +259200)
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 #"
echo -e "<?php\n\nconst VERSION = '$1';\n\nreturn VERSION;" > app/config/version.php
echo 'Updating PHP dependencies and auto-loading...'
composer update --ignore-platform-reqs --optimize-autoloader --no-dev --no-plugins --no-scripts --prefer-dist
echo 'Starting build...'
docker build -t appwrite/appwrite:"$1" .
echo 'Pushing build to registry...'
docker push appwrite/appwrite:"$1"