]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tools/refresh.py
Merge pull request #2192 from lonvia/database-versioning
[nominatim.git] / nominatim / tools / refresh.py
index b59c37bf9d5b46f1e74053ea3fd2c14621f5714b..5cfa1ab00e92a46d941bd1c55a3d7effbf6d38f1 100644 (file)
@@ -9,6 +9,7 @@ from textwrap import dedent
 from psycopg2.extras import execute_values
 
 from ..db.utils import execute_file
+from ..version import NOMINATIM_VERSION
 
 LOG = logging.getLogger()
 
@@ -258,9 +259,10 @@ def setup_website(basedir, phplib_dir, config):
                       <?php
 
                       @define('CONST_Debug', $_GET['debug'] ?? false);
-                      @define('CONST_LibDir', '{}');
+                      @define('CONST_LibDir', '{0}');
+                      @define('CONST_NominatimVersion', '{1[0]}.{1[1]}.{1[2]}-{1[3]}');
 
-                      """.format(phplib_dir))
+                      """.format(phplib_dir, NOMINATIM_VERSION))
 
     for php_name, conf_name, var_type in PHP_CONST_DEFS:
         if var_type == bool: