diff --git a/.dockerignore b/.dockerignore index 08cf3eb62..ac899de76 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,3 @@ datacube_wms/wms_cfg_local.py .pytest_cache -*/__pycache__ -.git \ No newline at end of file +*/__pycache__ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 425b1f9af..efb4c561f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,7 @@ RUN mkdir -p /code WORKDIR /code ADD . /code +RUN echo "version=\"`python setup.py --version`\"" > datacube_ows/_version.py RUN pip install . diff --git a/datacube_ows/__init__.py b/datacube_ows/__init__.py index 08f1df4d0..655fbbf80 100644 --- a/datacube_ows/__init__.py +++ b/datacube_ows/__init__.py @@ -1,4 +1,4 @@ try: from ._version import version as __version__ except ImportError: - __version__ = "Unknown - 1.8.x+?" + __version__ = "1.8.1+?" diff --git a/datacube_ows/ogc.py b/datacube_ows/ogc.py index d18473bb4..34b4f211f 100644 --- a/datacube_ows/ogc.py +++ b/datacube_ows/ogc.py @@ -6,6 +6,7 @@ from flask import g, render_template, request from flask_log_request_id import current_request_id +from datacube_ows import __version__ from datacube_ows.legend_generator import create_legend_for_style from datacube_ows.ogc_utils import capture_headers, resp_headers, get_service_base_url, lower_get_args from datacube_ows.wms import WMS_REQUESTS @@ -73,7 +74,13 @@ def ogc_impl(): cfg = get_config() url = nocase_args.get('Host', nocase_args['url_root']) base_url = get_service_base_url(cfg.allowed_urls, url) - return (render_template("index.html", cfg=cfg, supported=OWS_SUPPORTED, base_url=base_url), + return (render_template( + "index.html", + cfg=cfg, + supported=OWS_SUPPORTED, + base_url=base_url, + version=__version__, + ), 200, resp_headers({"Content-Type": "text/html"})) except OGCException as e: diff --git a/datacube_ows/templates/index.html b/datacube_ows/templates/index.html index ed6faa991..870d8ce33 100644 --- a/datacube_ows/templates/index.html +++ b/datacube_ows/templates/index.html @@ -35,11 +35,9 @@
-