]> git.parisson.com Git - docker-django-scripts.git/commitdiff
pull/upgrade : use new script to sync submodules
authorEmilie <zawadzki@ircam.fr>
Thu, 2 Nov 2017 11:00:50 +0000 (12:00 +0100)
committerEmilie <zawadzki@ircam.fr>
Thu, 2 Nov 2017 11:00:50 +0000 (12:00 +0100)
pull.sh
upgrade.sh

diff --git a/pull.sh b/pull.sh
index 1439544a6134d1e630ac8c4f755cd83aeb1e23d4..78840fc6a58a0d8a255836b38a3595cbce6a7f0b 100755 (executable)
--- a/pull.sh
+++ b/pull.sh
@@ -7,14 +7,8 @@ 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)'
+# Update submodules
+./bin/update_submodules.sh
 
 # Restore database
 if [ "$1" = "--restore-db" ];
index 212b901a88f739d38112c7b90c7b29017808ffd4..ffbf1340b9a99c96caaaaec06347cfb2f27c774f 100755 (executable)
@@ -2,16 +2,16 @@
 
 # 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)'
+
+# Update submodules
+./bin/update_submodules.sh
+
 # Apply migrations
 docker-compose run app python /srv/app/manage.py migrate
+
 # Build front-end
 ./bin/build_front.sh
+
 # Build documentation
 docker-compose run app bash /srv/doc/build.sh