From: Sarah Hoffmann Date: Mon, 1 Mar 2021 15:46:19 +0000 (+0100) Subject: introduce database patch level for version X-Git-Tag: v3.7.0~25^2~6 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/86273f5e2a81e626fd3358f06d769087f85b3451?hp=b4f64aa7708ece44e4ed802f51b9cfd557723874 introduce database patch level for version This will be needed later for automatic migrations. --- diff --git a/nominatim/tools/exec_utils.py b/nominatim/tools/exec_utils.py index b476c123..e6b9d8d4 100644 --- a/nominatim/tools/exec_utils.py +++ b/nominatim/tools/exec_utils.py @@ -134,7 +134,7 @@ def run_osm2pgsql(options): def get_url(url): """ Get the contents from the given URL and return it as a UTF-8 string. """ - headers = {"User-Agent" : "Nominatim/" + NOMINATIM_VERSION} + headers = {"User-Agent" : "Nominatim/{0[0]}.{0[1]}.{0[2]}-{0[3]}".format(NOMINATIM_VERSION)} try: with urlrequest.urlopen(urlrequest.Request(url, headers=headers)) as response: diff --git a/nominatim/version.py b/nominatim/version.py index 8d1c6849..e7f31a12 100644 --- a/nominatim/version.py +++ b/nominatim/version.py @@ -2,7 +2,15 @@ Version information for Nominatim. """ -NOMINATIM_VERSION = "3.6.0" +# Version information: major, minor, patch level, database patch level +# +# The first three numbers refer to the last released version. +# +# The database patch level tracks important changes between releases +# and must always be increased when there is a change to the database or code +# that requires a migration. +# Released versions always have a database patch level of 0. +NOMINATIM_VERSION = (3, 6, 0, 0) POSTGRESQL_REQUIRED_VERSION = (9, 3) POSTGIS_REQUIRED_VERSION = (2, 2)