-
Notifications
You must be signed in to change notification settings - Fork 0
/
codemeta-version-sql.tmpl
33 lines (31 loc) · 1.08 KB
/
codemeta-version-sql.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--
-- ${name} version information as SQL view
-- type: software
-- ${if(name)}title: "${name}"${endif}
-- ${if(description)}abstract: "${description}"${endif}
-- ${if(author)}authors:
-- ${for(author)}
-- - family-names: ${it.familyName}
-- given-names: ${it.givenName}
-- orcid: "${it.at__id}"
-- ${endfor}${endif}
-- ${if(contributor)}contributors:
-- ${for(contributor)}
-- - family-names: ${it.familyName}
-- given-names: ${it.givenName}
-- orcid: "${it.at__id}"
-- ${endfor}${endif}
-- ${if(maintainer)}maintainers:
-- ${for(maintainer)}
-- - family-names: ${it.familyName}
-- given-names: ${it.givenName}
-- orcid: "${it.at__id}"
-- ${endfor}${endif}
-- ${if(codeRepository)}repository-code: "${codeRepository}"${endif}
-- ${if(version)}version: ${version}${endif}
-- ${if(license)}license-url: "${license}"${endif}
-- ${if(keywords)}keywords: [ ${for(keywords)}"${it}"${sep}, ${endfor} ]${endif}
-- ${if(datePublished)}date-released: ${datePublished}${endif}
\c ${name}
CREATE OR REPLACE VIEW ${name}.version AS
SELECT '${name}' AS app_name, '${version}' AS version;