Skip to content

Commit

Permalink
Merge pull request City-of-Helsinki#51 from suutari-ai/update-hooks
Browse files Browse the repository at this point in the history
Add update script hooks
  • Loading branch information
suutari-ai authored Feb 13, 2018
2 parents bb073e5 + 3ef9823 commit 30113ef
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions post-update
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
set -e

pip install prequ==1.3.1
prequ sync requirements.txt
./manage.py compilemessages
./manage.py collectstatic --noinput
./manage.py migrate --noinput

if [ -x ../bin/update-notify ]; then
../bin/update-notify "Succesfully updated to $new_ver"
fi
6 changes: 6 additions & 0 deletions pre-update
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
set -e

if [ -x ../bin/update-notify ]; then
../bin/update-notify "Updating from $prev_ver to $new_ver"
fi

0 comments on commit 30113ef

Please sign in to comment.