From 54140bf859fd7c6fc5250d73945f9b684e395f45 Mon Sep 17 00:00:00 2001 From: Baptiste Lemoine Date: Mon, 30 Dec 2019 19:12:47 +0100 Subject: [PATCH] :zap: update script and submodule --- .gitmodules | 3 +++ README.md | 6 +++--- funky-framadate-front | 1 + update.sh | 29 +++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 160000 funky-framadate-front create mode 100644 update.sh diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..03ef2a9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "funky-framadate-front"] + path = funky-framadate-front + url = https://framagit.org/framasoft/framadate/funky-framadate-front.git diff --git a/README.md b/README.md index ed8f55f..d483294 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,13 @@ you can check that the database connection works with the command: php bin/console doctrine:schema:validate ``` +## Getting started # Development install dependencies with Composer -there are examples of request to make it all work. -## Getting started +there are examples of request to make it all work in the [doc/examples.md](doc/examples.md). ### install the vendors @@ -44,7 +44,7 @@ php bin/console server:run set a virtual host on your server, configure CORS access to have the API to work. configure database access in a .env.local file , replace variables DATABASE_URL=mysql://database_user:db_user_password@127.0.0.1:3306/database_name -this file is not versionned +this file is not versionned and should stay like this. ## cronjob to delete expired polls add this line in your crontab to run the clearance of expired polls everyday at 0h00. diff --git a/funky-framadate-front b/funky-framadate-front new file mode 160000 index 0000000..0730d4a --- /dev/null +++ b/funky-framadate-front @@ -0,0 +1 @@ +Subproject commit 0730d4a6ac8d5daccbb877a885b02f0305402906 diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..68aa814 --- /dev/null +++ b/update.sh @@ -0,0 +1,29 @@ +#!/bin/bash +echo "######################" +echo " time to update the framadate setup" +echo "######################" +git reset --hard +git pull origin master + +composer install +php bin/console doctrine:schema:update --force +echo "######################" +echo " update the funky frontend " +echo "######################" +git submodule update +echo "######################" +echo " check dependencies of the frontend with yarn " +echo "######################" +cd funky-framadate-front +yarn +echo "######################" +echo " building the frontend " +echo "######################" +yarn build +echo "######################" +echo " copying built files in the public folder of the symfony project " +echo "######################" +cp -r dist/* public/ +echo "######################" +echo " done " +echo "######################"