Skip to content

Commit e2456fb

Browse files
committed
Added a CITATION.cff test file and updates so it will find the file anywhere in the repo
1 parent d80ff99 commit e2456fb

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

pipeline.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ BANNER_NAME="cffconvert"
4747
FILE_TYPE_SEARCH_PATTERN='No Magic Pattern'
4848

4949
# File name to match [Regex based]
50-
FILE_NAME_SEARCH_PATTERN='^CITATION.cff$'
50+
FILE_NAME_SEARCH_PATTERN='CITATION.cff$'
5151

5252
# Set where to look for files.
5353
SCAN_ROOT='.'
@@ -83,7 +83,8 @@ function check_file()
8383

8484
file_count=$((file_count + 1))
8585
# shellcheck disable=SC2310
86-
if ! errors=$(run_command "${TEST_COMMAND[@]}" < "${filename}"); then
86+
87+
if ! errors=$(run_command "${TEST_COMMAND[@]}" "--infile" "${filename}"); then
8788
fail "${filename}" "${errors}"
8889
fail_count=$((fail_count + 1))
8990
else

tests/CITATION.cff

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cff-version: 1.2.0
2+
message: If you use this software, please cite it using these metadata.
3+
title: Validate Citation File
4+
abstract: Ensure that your CITATION.cff is valid.
5+
type: software
6+
version: 0.1.1
7+
date-released: 2024-06-24
8+
repository-code: https://github.com/CICDToolbox/validate-citation
9+
keywords:
10+
- "Wolf Software"
11+
- "Software"
12+
license: MIT
13+
authors:
14+
- family-names: "Wolf"
15+
orcid: "https://orcid.org/0009-0007-0983-2072"

0 commit comments

Comments
 (0)