Skip to content

Commit

Permalink
Added 'sort' stage to CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcfehling committed Mar 9, 2023
1 parent c8e2972 commit be97d54
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
28 changes: 28 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,34 @@ pipeline
}
}

stage("sort")
{
post {
failure {
githubNotify context: 'CI', description: 'publications not sorted. call make sort.', status: 'FAILURE'
}
}
steps
{
// ignore the first and last lines that only contain metainformation
sh '''#!/bin/bash
for f in publications-*.bib ; do
bibtool -q -r bibtool.rsc -i ./$f -o ./$f.result || exit 1 ; \
diff <(tail -n +2 ./$f | head -n -2) ./$f.result >> diff.result
done
if [ -s diff.result ] ; then
echo "ERROR. Publications are not sorted. Consult the README for instructions." >&2 ; \
echo "Reported issues:" >&2 ; \
cat diff.result >&2 ; \
rm *.result ; \
exit 1
else
rm *.result
fi
'''
}
}

stage("latex")
{
post {
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,21 @@ $ git checkout -b my_awesome_new_publication
Please try to select the correct entry type and to fill in as much of the mandatory fields for that selection.
You can see find more information about this point in this [Wikipedia entry](https://en.wikipedia.org/wiki/BibTeX#Entry_types).
If your publication has a URL or DOI number assigned to it, then it would be nice to enter that information as we will then generate a link straight to your publication.
5. Commit your changes to your local copy of the git repository.
5. Make sure that your entry is in the correct order and your citation key conforms to our style.
This step helps us to maintain the publication list and is completely automized.
You will need [bibtool](#installing-bibtool) and only have to call
```
$ make sort
```
6. Commit your changes to your local copy of the git repository.
```
$ git commit -m "Added entry <bibtex key>"
```
6. Push the changes to your fork of this repository
7. Push the changes to your fork of this repository
```
$ git push origin my_awesome_new_publication
```
7. Setup a pull request for your addition(s) within GitHub.
8. Setup a pull request for your addition(s) within GitHub.

## Commonly used entry templates

Expand Down

0 comments on commit be97d54

Please sign in to comment.