From be97d54e5e8e095f8f0e99add291dd81bf179f27 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Thu, 8 Sep 2022 11:53:02 -0600 Subject: [PATCH 1/2] Added 'sort' stage to CI. --- Jenkinsfile | 28 ++++++++++++++++++++++++++++ README.md | 12 +++++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5e0c5b8c..fc4ca1ef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 { diff --git a/README.md b/README.md index 58be2dde..3cb2a292 100644 --- a/README.md +++ b/README.md @@ -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 " ``` -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 From 1966364ce7beae3e4a43e1af50f49985e384c1e2 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Thu, 9 Mar 2023 12:09:44 +0100 Subject: [PATCH 2/2] TO BE REMOVED: Check whether sort stage finds and reports issues. --- publications-2000.bib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publications-2000.bib b/publications-2000.bib index 050c754d..b8e9bce0 100644 --- a/publications-2000.bib +++ b/publications-2000.bib @@ -9,7 +9,7 @@ @InProceedings{2000:bangerth:mesh url = {http://www.math.colostate.edu/~bangerth/publications/2000-waves2000.pdf} } -@TechReport{2000:bangerth:multi-threading, +@TechReport{2000:bangerth:multi-, author = {W. Bangerth}, title = {Multi-threading support in deal.II}, institution = {IWR Heidelberg},