Skip to content
Snippets Groups Projects
Commit 154da536 authored by Luke Simons's avatar Luke Simons
Browse files

Fixed pipeline. Added default empty return structure for tcv_get_deploymentinfo.m

parent 11b32feb
No related branches found
No related tags found
1 merge request!171Resolve "Add tcv_get_ids_bolometer to TCV_IMAS functions"
Pipeline #253025 passed
...@@ -118,15 +118,23 @@ for i=1:length(params_tcv2ids.ids_names) ...@@ -118,15 +118,23 @@ for i=1:length(params_tcv2ids.ids_names)
ids_from_tcv.(ids_to_get) = tmp.(ids_to_get); ids_from_tcv.(ids_to_get) = tmp.(ids_to_get);
ids_from_tcv.([ids_to_get '_description']) = tmp.([ids_to_get '_description']); ids_from_tcv.([ids_to_get '_description']) = tmp.([ids_to_get '_description']);
% Retrieve versioning information from .this-deployment.info % Retrieve versioning information from .this-deployment.info
if ~isempty(ids_from_tcv.(ids_to_get).code.name)
for ii = 1:numel(ids_from_tcv.code.library) library_gitinfo= ...
tcv_get_deploymentinfo(fullfile(fileparts(which(ids_from_tcv.(ids_to_get).code.name)),'.this-deployment.info'));
ids_from_tcv.(ids_to_get).code.commit = library_gitinfo.git_commit;
ids_from_tcv.(ids_to_get).code.version = library_gitinfo.git_tag;
ids_from_tcv.(ids_to_get).code.repository =library_gitinfo.gitlab_project_url;
end
for ii = 1:numel(ids_from_tcv.(ids_to_get).code.library)
if ~isempty(ids_from_tcv.(ids_to_get).code.library{ii}.name)
library_gitinfo= ... library_gitinfo= ...
tcv_get_deploymentinfo(fullfile(fileparts(which(ids_from_tcv_.code.library{ii}.name)),'.this-deployment.info')); tcv_get_deploymentinfo(fullfile(fileparts(which(ids_from_tcv.(ids_to_get).code.library{ii}.name)),'.this-deployment.info'));
ids_bolometer.code.library{ii}.commit = library_gitinfo.git_commit; ids_from_tcv.(ids_to_get).code.library{ii}.commit = library_gitinfo.git_commit;
ids_bolometer.code.library{ii}.version = library_gitinfo.git_tag; ids_from_tcv.(ids_to_get).code.library{ii}.version = library_gitinfo.git_tag;
ids_bolometer.code.library{ii}.repository =library_gitinfo.gitlab_project_url; ids_from_tcv.(ids_to_get).code.library{ii}.repository =library_gitinfo.gitlab_project_url;
end end
end
end end
......
...@@ -11,6 +11,10 @@ function info = tcv_get_deploymentinfo(function_name) ...@@ -11,6 +11,10 @@ function info = tcv_get_deploymentinfo(function_name)
% Initialize output struct % Initialize output struct
info = struct(); info = struct();
info.deployment_date='';
info.git_tag='';
info.git_commit='';
info.gitlab_project_url='';
try try
filepath=fullfile(fileparts(which(function_name)),'.this-deployment.info'); filepath=fullfile(fileparts(which(function_name)),'.this-deployment.info');
info.repository=fileparts(filepath); info.repository=fileparts(filepath);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment