Skip to content

Commit

Permalink
Merge pull request #167 from promised-ai/bugfix/citation-checking-cla…
Browse files Browse the repository at this point in the history
…rification

Fix/clarify `CITATION.cff` validation
  • Loading branch information
Swandog authored Jan 24, 2024
2 parents 8fceb61 + 6e3d7c3 commit ce3a18c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/citation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
push:
tags:
- rust-*
- python-*

jobs:
Validate-CITATION-cff:
Expand Down Expand Up @@ -33,7 +32,10 @@ jobs:
- name: Verify CITATION.cff date field
run: |
LAST_RELEASE=$(git describe --abbrev=0 --match="rust-*" --match="python-*" HEAD~1)
LAST_RELEASE=$(git describe --abbrev=0 --match="rust-*" HEAD~1)
echo $LAST_RELEASE
LAST_RELEASE_DATE=$(git cat-file -p $LAST_RELEASE:CITATION.cff | cffconvert -f schema.org | jq -r .datePublished)
CURRENT_RELEASE_DATE=$(cffconvert -f schema.org | jq -r .datePublished)
[[ ! "$CURRENT_RELEASE_DATE" < "$LAST_RELEASE_DATE" ]]
echo $CURRENT_RELEASE_DATE $LAST_RELEASE_DATE
# Verify that the release date was updated since the last release
[[ "$CURRENT_RELEASE_DATE" > "$LAST_RELEASE_DATE" ]]

0 comments on commit ce3a18c

Please sign in to comment.