[submodule "docker-composition-installer"]
- path = docker-composition-installer
+ path = install
url = git@github.com:yomguy/docker-composition-installer.git
+++ /dev/null
- #!/bin/sh
-
- docker-compose run db /srv/bin/db/backup.sh
--- /dev/null
+#!/bin/sh
+
+docker-compose run app bash /srv/doc/build.sh
--- /dev/null
+#!/bin/sh
+
+docker-compose run app python /srv/app/manage.py build-front
--- /dev/null
+#!/bin/sh
+
+docker-compose run app python /srv/app/manage.py graph_models organization-core organization-media organization-pages organization.network organization.magazine organization.projects organization.agenda organization.shop organization.job > /srv/doc/graph/mezzanine-organization.dot
--- /dev/null
+# docker-compose run app python manage.py compilemessages
+cd /srv
+
+find $(pwd) -type d -name 'locale' -print | while read f; do
+ cd "$f" && cd ..
+ echo $(pwd)
+ django-admin makemessages -l fr
+ django-admin compilemessages
+done
--- /dev/null
+#!/bin/sh
+
+docker-compose run app bash /srv/bin/build/local/messages.sh
--- /dev/null
+#!/bin/sh
+
+cat doc/src/overview.rst doc/src/architecture.rst doc/src/install.rst doc/src/development.rst doc/src/maintenance.rst doc/src/copyright.rst doc/src/license.rst > README.rst
+echo "Build finished. The README.rst file is up to date."
--- /dev/null
+#!/bin/bash
+
+ls /srv/lib/
+for module in `ls /srv/lib/`; do
+ cd /srv/lib/$module
+ if [ -f 'requirements.txt' ]; then
+ pip install -r requirements.txt
+ else
+ python setup.py develop
+ fi
+done
+++ /dev/null
-#!/bin/sh
-
-docker-compose run app bash /srv/doc/build.sh
+++ /dev/null
-#!/bin/sh
-
-docker-compose run app python /srv/app/manage.py build-front
-docker-compose run app python /srv/app/manage.py collectstatic --no-input
+++ /dev/null
-#!/bin/sh
-
-docker-compose run app python /srv/app/manage.py graph_models organization-core organization-media organization-pages organization.network organization.magazine organization.projects organization.agenda organization.shop organization.job > /srv/doc/graph/mezzanine-organization.dot
+++ /dev/null
-#!/bin/sh
-
-docker-compose run app bash /srv/bin/translations/messages.sh
+++ /dev/null
-#!/bin/sh
-
-cat doc/src/overview.rst doc/src/architecture.rst doc/src/install.rst doc/src/development.rst doc/src/maintenance.rst doc/src/copyright.rst doc/src/license.rst > README.rst
-echo "Build finished. The README.rst file is up to date."
+++ /dev/null
-#!/bin/sh
-
-docker-compose run app python /srv/app/manage.py collectstatic --no-input
+++ /dev/null
-#!/bin/bash
-
-# dump postgres or mysql functions of the database
-# export POSTGRES="$(dpkg --get-selections | grep postgres 2>&1)"
-# export MYSQL="$(dpkg --get-selections | grep mysql 2>&1)"
-
-if [ ! -z "$MYSQL_PASSWORD" ]; then
- export MYSQL_PWD=$MYSQL_PASSWORD
- mysqldump $MYSQL_DATABASE -hdb -u$MYSQL_USER | gzip > /srv/backup/mariadb.dump.gz
-elif [ ! -z "$POSTGRES_PASSWORD" ]; then
- export PGPASSWORD=$POSTGRES_PASSWORD
- pg_dump -Fc -hdb -Upostgres -dpostgres > /srv/backup/postgres.dump
-fi
-
-echo "Backup done!"
+++ /dev/null
-#!/bin/bash
-
-# import dump functions of the database (postgres or mysql)
-# export POSTGRES="$(dpkg --get-selections | grep postgres 2>&1)"
-# export MYSQL="$(dpkg --get-selections | grep mysql 2>&1)"
-
-if [ ! -z "$MYSQL_ROOT_PASSWORD" ]; then
- export MYSQL_PWD=$MYSQL_ROOT_PASSWORD
- gunzip < /srv/backup/mariadb.dump.gz | mysql -h db $MYSQL_DATABASE -uroot
-elif [ ! -z "$POSTGRES_PASSWORD" ]; then
- export PGPASSWORD=$POSTGRES_PASSWORD
- pg_restore -c -hdb -Upostgres -dpostgres /srv/backup/postgres.dump
-fi
-
-echo "Restore done!"
--- /dev/null
+#!/bin/bash
+
+# import dump functions of the database (postgres or mysql)
+# export POSTGRES="$(dpkg --get-selections | grep postgres 2>&1)"
+# export MYSQL="$(dpkg --get-selections | grep mysql 2>&1)"
+
+if [ ! -z "$MYSQL_ROOT_PASSWORD" ]; then
+ export MYSQL_PWD=$MYSQL_ROOT_PASSWORD
+ gunzip < /srv/backup/mariadb.dump.gz | mysql -h db $MYSQL_DATABASE -uroot
+elif [ ! -z "$POSTGRES_PASSWORD" ]; then
+ export PGPASSWORD=$POSTGRES_PASSWORD
+ pg_restore -c -hdb -Upostgres -dpostgres /srv/backup/postgres.dump
+fi
+
+echo "Restore done!"
--- /dev/null
+#!/bin/sh
+
+docker-compose run app python /srv/app/manage.py makemigrations -v 3 $1
--- /dev/null
+#!/bin/sh
+
+docker-compose run app python /srv/app/manage.py migrate -v 3
--- /dev/null
+#!/bin/bash
+
+cd "$(dirname "$0")"/../../
+
+# 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
+
+# Update submodules
+./bin/dev/update_submodules.sh
+
+# Restore database
+if [ "$1" = "--restore-db" ]; then
+ docker-compose run db /srv/bin/dev/restore_db.sh
+fi
+
+# We need to chown folders as they are docker's volumes
+sudo chown -R www-data var/media
+sudo chown -R root var/backup
--- /dev/null
+#!/bin/sh
+
+docker-compose run db /srv/bin/db/restore.sh
--- /dev/null
+#!/bin/sh
+
+docker-compose -f docker-compose.yml -f env/dev.yml up
--- /dev/null
+#!/bin/bash
+
+# The script detect the right main project branch, then update the submodule function of branch-[mainProjectBranch]
+# For example, if you define these variables in .gitmodules :
+# - branch-dev
+# - branch-master
+# If you are on dev branch in main project, the script will update submodule functions of branch-dev you've defined
+# In main project, if you are in another branch than master or dev, it will take by default dev branch
+# If you don't define any branches for you submodule, the script will update from master
+
+curr_branch=$(git symbolic-ref --short HEAD)
+
+echo $curr_branch
+if [ $curr_branch != "master" ] && [ $curr_branch != "dev" ];
+then
+ curr_branch="dev"
+fi
+
+function update_git_urls {
+ find ./ -type f \( -name ".gitmodules" -o -name "config" \) -exec sed -i $REGEX {} +
+}
+
+REGEX='s/https:\/\/github.com\//git@github.com:/g'
+update_git_urls
+
+# checkout new submodule
+git submodule update --init
+# 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-'$curr_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-'$curr_branch' || echo master)'
+++ /dev/null
-#!/bin/sh
-
-# Always remove intermediate containers and build app in dev mode
-docker-compose -f docker-compose.yml -f env/dev.yml build --force-rm --no-cache
-# Delete all stopped containers (including data-only containers)
-docker rm $(docker ps -a -q)
-# Delete all 'untagged/dangling' (<none>) images
-docker rmi $(docker images -q -f dangling=true)
-# restart app container
-docker-compose restart app
+++ /dev/null
-Subproject commit 12cfb2a1887d3a927e7f50a37945d20c5a89d70b
+++ /dev/null
-#!/bin/sh
-
-docker-compose -f docker-compose.yml -f env/dev.yml up
+++ /dev/null
-#!/bin/sh
-
-docker-compose -f docker-compose.yml -f env/prod.yml up
--- /dev/null
+#!/bin/sh
+
+# Always remove intermediate containers and build app in dev mode
+docker-compose -f docker-compose.yml -f env/dev.yml build --force-rm --no-cache
+# Delete all stopped containers (including data-only containers)
+docker rm $(docker ps -a -q)
+# Delete all 'untagged/dangling' (<none>) images
+docker rmi $(docker images -q -f dangling=true)
+# restart app container
+docker-compose restart app
--- /dev/null
+#!/bin/bash
+
+readonly PROGNAME=$(basename $0)
+
+port="${1}"
+foreground="false"
+stop="false"
+environment="default"
+quite="false"
+hostport="$1"
+
+usage="${PROGNAME} <port> [-h] [-s] [-f] [-e] [-hp] -- Forwards a docker-machine port so that you can access it locally
+
+where:
+ -h, --help Show this help text
+ -s, --stop Stop the port forwarding process
+ -f, --foreground Run the docker-machine ssh client in foreground instead of background
+ -e, --environment The name of the docker-machine environment (default is default)
+ -q, --quite Don't print anything to the console, not even errors
+
+examples:
+ # Port forward port 8047 in docker-machine environment default
+ \$ ${PROGNAME} 8047
+
+ # Port forward docker port 8047 to host port 8087 in docker-machine environment default
+ \$ ${PROGNAME} 8087:8047
+
+ # Port forward port 8047 in docker-machine dev
+ \$ ${PROGNAME} 8047 -e dev
+
+ # Runs in foreground (port forwarding is automatically stopped when process is terminated)
+ \$ ${PROGNAME} 8047 -f
+
+ # Stop the port forwarding for this port
+ \$ ${PROGNAME} 8047 -s"
+
+if [ $# -eq 0 ]; then
+ echo "$usage"
+ exit 1
+fi
+
+if [ -z "$1" ]; then
+ echo "You need to specify the port to forward" >&2
+ echo "$usage"
+ exit 1
+fi
+
+if [ "$#" -ne 0 ]; then
+ while [ "$#" -gt 0 ]
+ do
+ case "$1" in
+ -h|--help)
+ echo "$usage"
+ exit 0
+ ;;
+ -f|--foreground)
+ foreground="true"
+ ;;
+ -s|--stop)
+ stop="true"
+ ;;
+ -e|--environment)
+ environment="$2"
+ ;;
+ -q|--quite)
+ quite="true"
+ ;;
+ --)
+ break
+ ;;
+ -*)
+ echo "Invalid option '$1'. Use --help to see the valid options" >&2
+ exit 1
+ ;;
+ # an option argument, continue
+ *) ;;
+ esac
+ shift
+ done
+fi
+
+pidport() {
+ lsof -n -i4TCP:$1 | grep --exclude-dir={.bzr,CVS,.git,.hg,.svn} LISTEN
+}
+
+# Check if port contains ":", if so we should split
+if [[ $port == *":"* ]]; then
+ # Split by :
+ ports=(${port//:/ })
+ if [[ ${#ports[@]} != 2 ]]; then
+ if [[ $quite == "false" ]]; then
+ echo "Port forwarding should be defined as hostport:targetport, for example: 8090:8080"
+ fi
+ exit 1
+ fi
+
+
+ hostport=${ports[0]}
+ port=${ports[1]}
+fi
+
+
+if [[ ${stop} == "true" ]]; then
+ result=`pidport $hostport`
+
+ if [ -z "${result}" ]; then
+ if [[ $quite == "false" ]]; then
+ echo "Port $hostport is not forwarded, cannot stop"
+ fi
+ exit 1
+ fi
+
+ process=`echo "${result}" | awk '{ print $1 }'`
+ if [[ $process != "ssh" ]]; then
+ if [[ $quite == "false" ]]; then
+ echo "Port $hostport is bound by process ${process} and not by docker-machine, won't stop"
+ fi
+ exit 1
+ fi
+
+ pid=`echo "${result}" | awk '{ print $2 }'` &&
+ kill $pid &&
+ echo "Stopped port forwarding for $hostport"
+else
+ docker-machine ssh $environment `if [[ ${foreground} == "false" ]]; then echo "-f -N"; fi` -L $hostport:localhost:$port &&
+ if [[ $quite == "false" ]] && [[ $foreground == "false" ]]; then
+ printf "Forwarding port $port"
+ if [[ $hostport -ne $port ]]; then
+ printf " to host port $hostport"
+ fi
+ echo " in docker-machine environment $environment."
+ fi
+fi
+++ /dev/null
-#!/bin/sh
-
-docker-compose stop
-mv data var
-mkdir var/lib
-sudo mv var/postgresql var/lib
-sudo mv var/external var/opt
-sudo mv var/var/log var
-sudo rm -rf var/var
--- /dev/null
+Subproject commit 12cfb2a1887d3a927e7f50a37945d20c5a89d70b
+++ /dev/null
-#!/bin/sh
-
-docker-compose run app python /srv/app/manage.py makemigrations -v 3 $1
+++ /dev/null
-echo "----------------------------"
-echo `date +\%Y\%m\%d-\%H-\%M-\%S`
-docker-compose run db /srv/bin/db/backup.sh
-git add var
-git commit -a -m "update DB and media"
-git pull
-git push
+++ /dev/null
-#!/bin/sh
-
-docker-compose run app python /srv/app/manage.py migrate -v 3
--- /dev/null
+#!/bin/sh
+
+docker-compose stop
+mv data var
+mkdir var/lib
+sudo mv var/postgresql var/lib
+sudo mv var/external var/opt
+sudo mv var/var/log var
+sudo rm -rf var/var
--- /dev/null
+#!/bin/sh
+
+docker-compose exec app python /srv/app/manage.py poll_twitter --force
+++ /dev/null
-#!/bin/bash
-
-readonly PROGNAME=$(basename $0)
-
-port="${1}"
-foreground="false"
-stop="false"
-environment="default"
-quite="false"
-hostport="$1"
-
-usage="${PROGNAME} <port> [-h] [-s] [-f] [-e] [-hp] -- Forwards a docker-machine port so that you can access it locally
-
-where:
- -h, --help Show this help text
- -s, --stop Stop the port forwarding process
- -f, --foreground Run the docker-machine ssh client in foreground instead of background
- -e, --environment The name of the docker-machine environment (default is default)
- -q, --quite Don't print anything to the console, not even errors
-
-examples:
- # Port forward port 8047 in docker-machine environment default
- \$ ${PROGNAME} 8047
-
- # Port forward docker port 8047 to host port 8087 in docker-machine environment default
- \$ ${PROGNAME} 8087:8047
-
- # Port forward port 8047 in docker-machine dev
- \$ ${PROGNAME} 8047 -e dev
-
- # Runs in foreground (port forwarding is automatically stopped when process is terminated)
- \$ ${PROGNAME} 8047 -f
-
- # Stop the port forwarding for this port
- \$ ${PROGNAME} 8047 -s"
-
-if [ $# -eq 0 ]; then
- echo "$usage"
- exit 1
-fi
-
-if [ -z "$1" ]; then
- echo "You need to specify the port to forward" >&2
- echo "$usage"
- exit 1
-fi
-
-if [ "$#" -ne 0 ]; then
- while [ "$#" -gt 0 ]
- do
- case "$1" in
- -h|--help)
- echo "$usage"
- exit 0
- ;;
- -f|--foreground)
- foreground="true"
- ;;
- -s|--stop)
- stop="true"
- ;;
- -e|--environment)
- environment="$2"
- ;;
- -q|--quite)
- quite="true"
- ;;
- --)
- break
- ;;
- -*)
- echo "Invalid option '$1'. Use --help to see the valid options" >&2
- exit 1
- ;;
- # an option argument, continue
- *) ;;
- esac
- shift
- done
-fi
-
-pidport() {
- lsof -n -i4TCP:$1 | grep --exclude-dir={.bzr,CVS,.git,.hg,.svn} LISTEN
-}
-
-# Check if port contains ":", if so we should split
-if [[ $port == *":"* ]]; then
- # Split by :
- ports=(${port//:/ })
- if [[ ${#ports[@]} != 2 ]]; then
- if [[ $quite == "false" ]]; then
- echo "Port forwarding should be defined as hostport:targetport, for example: 8090:8080"
- fi
- exit 1
- fi
-
-
- hostport=${ports[0]}
- port=${ports[1]}
-fi
-
-
-if [[ ${stop} == "true" ]]; then
- result=`pidport $hostport`
-
- if [ -z "${result}" ]; then
- if [[ $quite == "false" ]]; then
- echo "Port $hostport is not forwarded, cannot stop"
- fi
- exit 1
- fi
-
- process=`echo "${result}" | awk '{ print $1 }'`
- if [[ $process != "ssh" ]]; then
- if [[ $quite == "false" ]]; then
- echo "Port $hostport is bound by process ${process} and not by docker-machine, won't stop"
- fi
- exit 1
- fi
-
- pid=`echo "${result}" | awk '{ print $2 }'` &&
- kill $pid &&
- echo "Stopped port forwarding for $hostport"
-else
- docker-machine ssh $environment `if [[ ${foreground} == "false" ]]; then echo "-f -N"; fi` -L $hostport:localhost:$port &&
- if [[ $quite == "false" ]] && [[ $foreground == "false" ]]; then
- printf "Forwarding port $port"
- if [[ $hostport -ne $port ]]; then
- printf " to host port $hostport"
- fi
- echo " in docker-machine environment $environment."
- fi
-fi
+++ /dev/null
-#!/bin/sh
-
-docker-compose exec app python /srv/app/manage.py poll_twitter --force
--- /dev/null
+ #!/bin/sh
+
+ docker-compose run db /srv/bin/prod/local/backup_db.sh
--- /dev/null
+#!/bin/sh
+
+docker-compose run app python /srv/app/manage.py collectstatic --no-input
--- /dev/null
+#!/bin/bash
+
+# dump postgres or mysql functions of the database
+# export POSTGRES="$(dpkg --get-selections | grep postgres 2>&1)"
+# export MYSQL="$(dpkg --get-selections | grep mysql 2>&1)"
+
+if [ ! -z "$MYSQL_PASSWORD" ]; then
+ export MYSQL_PWD=$MYSQL_PASSWORD
+ mysqldump $MYSQL_DATABASE -hdb -u$MYSQL_USER | gzip > /srv/backup/mariadb.dump.gz
+elif [ ! -z "$POSTGRES_PASSWORD" ]; then
+ export PGPASSWORD=$POSTGRES_PASSWORD
+ pg_dump -Fc -hdb -Upostgres -dpostgres > /srv/backup/postgres.dump
+fi
+
+echo "Backup done!"
--- /dev/null
+#!/bin/sh
+
+docker-compose run app python /srv/app/manage.py migrate
--- /dev/null
+#!/bin/bash
+
+echo "----------------------------"
+echo `date +\%Y\%m\%d-\%H-\%M-\%S`
+docker-compose run db /srv/bin/prod/backup_db.sh
+cd var
+git add .
+git commit -a -m "update DB and media"
+git pull
+git push
--- /dev/null
+#!/bin/sh
+
+docker-compose -f docker-compose.yml -f env/prod.yml up
--- /dev/null
+#!/bin/bash
+
+# The script detect the right main project branch, then update the submodule function of branch-[mainProjectBranch]
+# For example, if you define these variables in .gitmodules :
+# - branch-dev
+# - branch-master
+# If you are on dev branch in main project, the script will update submodule functions of branch-dev you've defined
+# In main project, if you are in another branch than master or dev, it will take by default dev branch
+# If you don't define any branches for you submodule, the script will update from master
+
+curr_branch=$(git symbolic-ref --short HEAD)
+
+echo $curr_branch
+if [ $curr_branch != "master" ] && [ $curr_branch != "dev" ];
+then
+ curr_branch="dev"
+fi
+
+function update_git_urls {
+ find ./ -type f \( -name ".gitmodules" -o -name "config" \) -exec sed -i $REGEX {} +
+}
+
+REGEX='s/git@github.com:/https:\/\/github.com\//g'
+update_git_urls
+
+# checkout new submodule
+git submodule update --init
+# 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-'$curr_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-'$curr_branch' || echo master)'
--- /dev/null
+#!/bin/bash
+
+cd "$(dirname "$0")"/../../
+
+# Update main project
+git pull
+
+# Update submodules
+./bin/update_submodules.sh
+
+# Apply migrations
+if [ "$1" = "--migrate" ]; then
+ docker-compose run app python /srv/app/manage.py migrate
+fi
+
+# Build front-end
+if [ "$1" = "--front" ]; then
+ docker-compose run app python /srv/app/manage.py build-front
+fi
+
+# Build documentation
+if [ "$1" = "--doc" ]; then
+ docker-compose run app bash /srv/doc/build.sh
+fi
+
+# Collect static files
+if [ "$1" = "--collect" ]; then
+ docker-compose run app python manage.py collectstatic --noinput
+fi
+
+# Reload Wsgi
+if [ "$1" = "--reload" ]; then
+ touch app/wsgi.py
+fi
+
+# Install local cron to
+if [ "$1" = "--cron" ]; then
+ sudo cp ./etc/cron.d/* /etc/cron.d/
+fi
+++ /dev/null
-#!/bin/bash
-
-cd "$(dirname "$0")"/../
-
-# 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
-
-# Update submodules
-./bin/update_submodules.sh
-
-# Restore database
-if [ "$1" = "--restore-db" ]; then
- docker-compose run db /srv/bin/db/restore.sh
-fi
-
-# We need to chown folders as they are docker's volumes
-sudo chown -R www-data var/media
-sudo chown -R root var/backup
+++ /dev/null
-#!/bin/bash
-
-echo "----------------------------"
-echo `date +\%Y\%m\%d-\%H-\%M-\%S`
-docker-compose run db /srv/bin/db/backup.sh
-cd var
-git add .
-git commit -a -m "update DB and media"
-git pull
-git push
+++ /dev/null
-#!/bin/sh
-
-docker-compose run db /srv/bin/db/restore.sh
+++ /dev/null
-#!/bin/bash
-
-ls /srv/lib/
-for module in `ls /srv/lib/`; do
- cd /srv/lib/$module
- if [ -f 'requirements.txt' ]; then
- pip install -r requirements.txt
- else
- python setup.py develop
- fi
-done
--- /dev/null
+echo "----------------------------"
+echo `date +\%Y\%m\%d-\%H-\%M-\%S`
+docker-compose run db /srv/bin/db/backup.sh
+git add var
+git commit -a -m "update DB and media"
+git pull
+git push
--- /dev/null
+#!/bin/sh
+
+git submodule update --recursive --remote
+++ /dev/null
-# docker-compose run app python manage.py compilemessages
-cd /srv
-
-find $(pwd) -type d -name 'locale' -print | while read f; do
- cd "$f" && cd ..
- echo $(pwd)
- django-admin makemessages -l fr
- django-admin compilemessages
-done
+++ /dev/null
-#!/bin/bash
-
-# The script detect the right main project branch, then update the submodule function of branch-[mainProjectBranch]
-# For example, if you define these variables in .gitmodules :
-# - branch-dev
-# - branch-master
-# If you are on dev branch in main project, the script will update submodule functions of branch-dev you've defined
-# In main project, if you are in another branch than master or dev, it will take by default dev branch
-# If you don't define any branches for you submodule, the script will update from master
-
-curr_branch=$(git symbolic-ref --short HEAD)
-
-echo $curr_branch
-if [ $curr_branch != "master" ] && [ $curr_branch != "dev" ];
-then
- curr_branch="dev"
-fi
-
-function update_git_urls {
- find ./ -type f \( -name ".gitmodules" -o -name "config" \) -exec sed -i $REGEX {} +
-}
-
-if [ "$1" = "--ssh" ]; then
- REGEX='s/https:\/\/github.com\//git@github.com:/g'
- update_git_urls
-fi
-
-if [ "$1" = "--https" ]; then
- REGEX='s/git@github.com:/https:\/\/github.com\//g'
- update_git_urls
-fi
-
-# checkout new submodule
-git submodule update --init
-# 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-'$curr_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-'$curr_branch' || echo master)'
+++ /dev/null
-#!/bin/sh
-
-git submodule update --recursive --remote
+++ /dev/null
-#!/bin/bash
-
-# Update main project
-git pull
-
-# Update submodules
-./bin/update_submodules.sh
-
-# Apply migrations
-if [ "$1" = "--migrate" ]; then
- docker-compose run app python /srv/app/manage.py migrate
-fi
-
-# Build front-end
-if [ "$1" = "--front" ]; then
- ./bin/build_front.sh
-fi
-
-# Build documentation
-if [ "$1" = "--doc" ]; then
- docker-compose run app bash /srv/doc/build.sh
-fi
-
-# Collect static files
-if [ "$1" = "--collect" ]; then
- docker-compose run app python manage.py collectstatic --noinput
-fi
-
-# Reload Wsgi
-if [ "$1" = "--reload" ]; then
- touch app/wsgi.py
-fi
-
-# Install local cron to
-if [ "$1" = "--cron" ]; then
- sudo cp ./etc/cron.d/* /etc/cron.d/
-fi