Skip to content
Snippets Groups Projects
Commit ad68d5cd authored by Thorge Petersen's avatar Thorge Petersen
Browse files

Removed the functionality that retrieved the current commit hash of the...

Removed the functionality that retrieved the current commit hash of the checked out Git repository for the extension
parent 7a80b669
Branches
Tags
1 merge request!48Merge dev into master
...@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed ### Removed
- Removed Travis CI 'bin/' directory, along with all associated Travis CI configuration files and scripts. - 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 ### Changed
......
...@@ -253,19 +253,6 @@ def odsh_public_resource_url(res): ...@@ -253,19 +253,6 @@ def odsh_public_resource_url(res):
return res['url'] 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(): def odsh_show_testbanner():
return config.get('ckanext.odsh.showtestbanner', False) == True return config.get('ckanext.odsh.showtestbanner', False) == True
......
...@@ -323,7 +323,6 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm ...@@ -323,7 +323,6 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm
'odsh_public_url': odsh_helpers.odsh_public_url, 'odsh_public_url': odsh_helpers.odsh_public_url,
'odsh_spatial_extends_available': odsh_helpers.spatial_extends_available, 'odsh_spatial_extends_available': odsh_helpers.spatial_extends_available,
'odsh_public_resource_url': odsh_helpers.odsh_public_resource_url, '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, 'odsh_show_testbanner': odsh_helpers.odsh_show_testbanner,
'tpsh_get_daterange_prettified': helper_pkg_dict.get_daterange_prettified, 'tpsh_get_daterange_prettified': helper_pkg_dict.get_daterange_prettified,
'tpsh_get_language_of_package': helpers_tpsh.get_language_of_package, 'tpsh_get_language_of_package': helpers_tpsh.get_language_of_package,
......
{{ h.odsh_get_version_id()}}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment