Merge branch 'master' into 'production'

Master

See merge request Romulus21/portal!29
This commit is contained in:
Romain Delanoë
2020-04-12 10:17:07 +00:00
2 changed files with 7 additions and 1 deletions

View File

@@ -14,7 +14,6 @@ class User extends JsonResource
*/
public function toArray($request)
{
// dd($this);
return [
'data' => [
'type' => 'users',

View File

@@ -11,6 +11,8 @@ do
user="${line##*=}"
elif [ "DB_PASSWORD" == "${line%=*}" ]; then
pass="${line##*=}"
elif [ "RSYNC_SAV" == "${line%=*}" ]; then
rsync="${line##*=}"
fi
done < "$input"
@@ -29,6 +31,11 @@ fi
mysqldump --user="$user" --password="$pass" -B "$database" > storage/logs/database/save-"$database"-"$year""$month""$day"-"$hour""$minutes".sql
if [ $rsync ]; then
echo 'save by Rsync'
rsync -avz --progress storage/logs/database/save-"$database"-"$year""$month""$day"-"$hour""$minutes".sql ssh $rsync
fi
if [ "production" == "$env" ];
then
echo "deploy in production"