diff --git a/CHANGELOG.md b/CHANGELOG.md index 456d020a6904e1990cfd8fdcef352ff34fcca2a2..2cfd25faaae9351061c9fcba7e0beedfa2c9d418 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - Removed Travis CI 'bin/' directory, along with all associated Travis CI configuration files and scripts. +- Removed the functionality that retrieved the current commit hash of the checked out Git repository for the extension. The commit hash was previously inserted into a custom API resource to provide external developers repository information. ### Changed diff --git a/ckanext/odsh/helpers.py b/ckanext/odsh/helpers.py index ddcea24e1a77ed51a8b59a5286bd10fc281a16be..5323377b2a6b99440faa18900ad8f86a1cdca42e 100644 --- a/ckanext/odsh/helpers.py +++ b/ckanext/odsh/helpers.py @@ -253,19 +253,6 @@ def odsh_public_resource_url(res): return res['url'] -def odsh_get_version_id(): - try: - home = config.get('ckanext.odsh.home', '/usr/lib/ckan/default/src/ckanext-odsh') - if home: - if home[-1] == '/': - home = home[:-1] - home += '/.git' - return subprocess.check_output(["git", "--git-dir", home, "rev-parse", "HEAD"]).strip() - except: - return 'unknown' - return 'unknown' - - def odsh_show_testbanner(): return config.get('ckanext.odsh.showtestbanner', False) == True diff --git a/ckanext/odsh/plugin.py b/ckanext/odsh/plugin.py index 45341ea9a59622cdbd8b81222ab1b223951534cf..998aac33f4511b34c52e6f00979abaccd3e4bb56 100644 --- a/ckanext/odsh/plugin.py +++ b/ckanext/odsh/plugin.py @@ -323,7 +323,6 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm 'odsh_public_url': odsh_helpers.odsh_public_url, 'odsh_spatial_extends_available': odsh_helpers.spatial_extends_available, 'odsh_public_resource_url': odsh_helpers.odsh_public_resource_url, - 'odsh_get_version_id': odsh_helpers.odsh_get_version_id, 'odsh_show_testbanner': odsh_helpers.odsh_show_testbanner, 'tpsh_get_daterange_prettified': helper_pkg_dict.get_daterange_prettified, 'tpsh_get_language_of_package': helpers_tpsh.get_language_of_package, diff --git a/ckanext/odsh/templates/api/resource_qv4yAI2rgotamXGk98gJ.html b/ckanext/odsh/templates/api/resource_qv4yAI2rgotamXGk98gJ.html deleted file mode 100644 index 2ba851cb4e2ed79b62c69633d4e945a3d5b0bce5..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/api/resource_qv4yAI2rgotamXGk98gJ.html +++ /dev/null @@ -1 +0,0 @@ -{{ h.odsh_get_version_id()}} \ No newline at end of file