]> git.parisson.com Git - docker-django-scripts.git/commitdiff
[git] : add sync remote submodule + doc
authorEmilie <zawadzki@ircam.fr>
Thu, 12 Oct 2017 14:44:58 +0000 (16:44 +0200)
committerEmilie <zawadzki@ircam.fr>
Thu, 12 Oct 2017 14:44:58 +0000 (16:44 +0200)
pull.sh
upgrade.sh

diff --git a/pull.sh b/pull.sh
index a9a1c0849656b6495ec1962d95fe01246101be93..8e6a36aed8f118c2082e0680ce8ca8f280af5998 100755 (executable)
--- a/pull.sh
+++ b/pull.sh
@@ -1,12 +1,21 @@
 #!/bin/sh
 
+# We need to chown folders as they are docker's volumes
 sudo chown -R $USER var/media
 sudo chown -R $USER var/backup
+
+# Update main project
 git pull
+# Synchronizes submodules' remote URL configuration setting to the value specified in .gitmodules
+git submodule sync
+# Checkout all submodules on right branches specified in .gitmodules, by default the branch is master
 git submodule foreach --recursive 'git checkout $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo master)'
+# Pull all submodules on right branches specified in .gitmodules, by default the branch is master
 git submodule foreach --recursive 'git pull origin $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo master)'
+# Restore database
 if [ "$1" = "--restore-db" ];
     then
     docker-compose run db /srv/bin/db/restore.sh
 fi
+# Build front-end
 docker-compose run app bash -c "cd /srv && bower --allow-root install && gulp build"
index 393160d85a4352e5dfdf783e8bc6108193b5b546..212b901a88f739d38112c7b90c7b29017808ffd4 100755 (executable)
@@ -1,18 +1,27 @@
 #!/bin/sh
 
+# Update main project
 git pull
+# Synchronizes submodules' remote URL configuration setting to the value specified in .gitmodules
+git submodule sync
+# Checkout all submodules on right branches specified in .gitmodules, by default the branch is master
 git submodule foreach --recursive 'git checkout $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo master)'
+# Pull all submodules on right branches specified in .gitmodules, by default the branch is master
 git submodule foreach --recursive 'git pull origin $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo master)'
+# Apply migrations
 docker-compose run app python /srv/app/manage.py migrate
-# docker-compose run app python /srv/app/manage.py update_translation_fields
-docker-compose run app bash -c "cd /srv && bower --allow-root install && gulp build"
-docker-compose run app python /srv/app/manage.py collectstatic --noinput
+# Build front-end
+./bin/build_front.sh
+# Build documentation
 docker-compose run app bash /srv/doc/build.sh
+
+# Reload Wsgi
 if [ "$1" = "--reload-wsgi" ];
     then
     touch app/wsgi.py
 fi
 
+# Install local cron to
 if [ "$1" = "--cron" ];
     then
     sudo cp /srv/ircam-www/etc/cron.d/app /etc/cron.d/ircam-www