#!/bin/bash

# Change directory
cd /var/www/acermi.com/backoffice/

# Resets the index and working tree
git reset --hard

# Git pull
git pull

# Composer update
composer update --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader

# Remove cache files
sudo rm -rf data/cache/*.php

# Change owner and rights
sudo chown administrateur:www-data -R .
#sudo chmod 755 -R .
#sudo chmod 775 -R data
sudo chmod 775 -R .

exit 0;

