From: Guillaume Pellerin Date: Tue, 6 Mar 2018 17:33:45 +0000 (+0100) Subject: Update paths X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=1177a587e310e84de1c6e045f14b22b687a2f392;p=docker-django-scripts.git Update paths --- diff --git a/build/local/messages.sh b/build/local/messages.sh index 0d0c263..5fe3892 100755 --- a/build/local/messages.sh +++ b/build/local/messages.sh @@ -1,4 +1,5 @@ # docker-compose run app python manage.py compilemessages + cd /srv find $(pwd) -type d -name 'locale' -print | while read f; do diff --git a/build/readme.sh b/build/readme.sh index 6515727..a22fb8c 100755 --- a/build/readme.sh +++ b/build/readme.sh @@ -3,4 +3,5 @@ cd "$(dirname "$0")"/../../ 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." diff --git a/dev/pull.sh b/dev/pull.sh deleted file mode 100755 index 556e135..0000000 --- a/dev/pull.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/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 and submodules -./bin/dev/update.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 -# (do not work on OSX, hence the test) -if ! uname -a | grep Darwin > /dev/null; then - sudo chown -R www-data var/media - sudo chown -R root var/backup -fi diff --git a/dev/pull_data.sh b/dev/pull_data.sh new file mode 100755 index 0000000..41936d9 --- /dev/null +++ b/dev/pull_data.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +cd "$(dirname "$0")"/../../var + +# We need to chown folders as they are docker's volumes +sudo chown -R $USER media +sudo chown -R $USER backup + +git pull + +# 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 +# (do not work on OSX, hence the test) +if ! uname -a | grep Darwin > /dev/null; then + sudo chown -R www-data media + sudo chown -R root backup +fi diff --git a/dev/restore_db.sh b/dev/restore_db.sh index 8b9e895..53b9bc4 100755 --- a/dev/restore_db.sh +++ b/dev/restore_db.sh @@ -1,3 +1,3 @@ #!/bin/sh -docker-compose run db /srv/bin/db/restore.sh +docker-compose run db /srv/bin/dev/local/restore_db.sh diff --git a/prod/backup_db.sh b/prod/backup_db.sh index c8d8904..91d789a 100755 --- a/prod/backup_db.sh +++ b/prod/backup_db.sh @@ -1,3 +1,3 @@ #!/bin/sh - docker-compose run db /srv/bin/prod/local/backup_db.sh +docker-compose run db /srv/bin/prod/local/backup_db.sh diff --git a/prod/push.sh b/prod/push.sh deleted file mode 100755 index 8f06240..0000000 --- a/prod/push.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -cd "$(dirname "$0")"/../../ - -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 diff --git a/prod/push_data.sh b/prod/push_data.sh new file mode 100755 index 0000000..2288589 --- /dev/null +++ b/prod/push_data.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +echo "----------------------------" +echo `date +\%Y\%m\%d-\%H-\%M-\%S` + +./backup_db.sh + +cd "$(dirname "$0")"/../../var + +git add . +git commit -a -m "update DB and media" +git pull +git push diff --git a/tmp/mezzo-push.sh b/tmp/mezzo-push.sh deleted file mode 100755 index 7a5d2a3..0000000 --- a/tmp/mezzo-push.sh +++ /dev/null @@ -1,7 +0,0 @@ -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 diff --git a/tmp/update_translation_fields.sh b/tmp/update_translation_fields.sh deleted file mode 100755 index 66f3479..0000000 --- a/tmp/update_translation_fields.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -git submodule update --recursive --remote