]> git.openstreetmap.org Git - chef.git/blob - cookbooks/nominatim/templates/default/git-post-merge-hook.erb
nominatim: add automatic migration on updates
[chef.git] / cookbooks / nominatim / templates / default / git-post-merge-hook.erb
1 #!/bin/bash
2
3 # DO NOT EDIT - This file is being maintained by Chef
4
5 cd <%= @srcdir %>
6
7 git submodule update
8
9 cd <%= @builddir %>
10
11 cmake <%= @srcdir %> &&
12 make
13
14 psql -d <%= @dbname %> -c "SELECT version();" >/dev/null 2>&1
15 if [[ "$?" == "0" ]]; then
16   ./nominatim admin --migrate
17   ./nominatim refresh --functions --address-levels --website
18 fi