]> git.openstreetmap.org Git - chef.git/commitdiff
nominatim: run git update in source directory
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 30 Sep 2016 19:12:34 +0000 (21:12 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 30 Sep 2016 19:12:34 +0000 (21:12 +0200)
cookbooks/nominatim/recipes/base.rb
cookbooks/nominatim/recipes/default.rb
cookbooks/nominatim/templates/default/updater.erb

index 9a3252c72e54f63f94255378e99ae4d8f6045f99..242ada30d08beee1c67670738f34733893bbe582 100644 (file)
@@ -196,6 +196,7 @@ template "#{source_directory}/utils/nominatim-update" do
   group "nominatim"
   mode 0o755
   variables :bindir => source_directory,
+            :srcdir => source_directory,
             :logfile => "#{node[:nominatim][:logdir]}/update.log",
             :branch => node[:nominatim][:revision],
             :update_stop_file => "#{home_directory}/status/updates_disabled"
index 2e5887b5ae4564a2e4f504f2399404f1f7b668b2..f515474902fd0444088f6188fda3b581c8914d7c 100644 (file)
@@ -244,6 +244,7 @@ template "#{source_directory}/utils/nominatim-update" do
   group "nominatim"
   mode 0o755
   variables :bindir => build_directory,
+            :srcdir => source_directory,
             :logfile => "#{node[:nominatim][:logdir]}/update.log",
             :branch => node[:nominatim][:revision],
             :update_stop_file => "#{basedir}/status/updates_disabled"
index 5c5a4448b5f6898e7ca99e628d24bb8abbd18d1d..8a3cf027edf4f2549a835e300d8e5d566afc8c49 100644 (file)
@@ -13,12 +13,14 @@ do
 
     ./utils/update.php --no-npi --import-osmosis
 
+    pushd <%= @srcdir %>
     if git fetch origin; then
       # will trigger recompilation if necessary
       git merge origin/<%= @branch %>
     else
       echo "WARNING: git fetch failed."
     fi
+    popd
 
     # sleep a bit if updates take less than a minute
     endtime=`date +%s`