Commit c2c5bcf1 authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

fix write daff file if no metadata is used

also added git commit hash to data
parent dd77a633
......@@ -74,7 +74,7 @@ assert( betarange( 1 ) <= 180.0 )
%% Assemble metadata (if not already present)
keyname = 'Generation script';
if ~any( strcmpi( { metadata(:).name }, keyname ) )
if isempty(metadata) || ~any( strcmpi( { metadata(:).name }, keyname ) )
metadata = daffv17_add_metadata( metadata, keyname, 'String', 'writeDAFFFile.m' );
end
......@@ -88,6 +88,12 @@ if ~any( strcmpi( { metadata(:).name }, keyname ) )
metadata = daffv17_add_metadata( metadata, keyname, 'String', date );
end
keyname = 'Git Version';
if ~any( strcmpi( { metadata(:).name }, keyname ) )
versionHash = ita_git_getMasterCommitHash;
metadata = daffv17_add_metadata( metadata, keyname, 'String', versionHash );
end
keyname = 'Web resource';
if ~any( strcmpi( { metadata(:).name }, keyname ) )
metadata = daffv17_add_metadata( metadata, keyname, 'String', 'http://www.ita-toolkit.org' );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment