From 38fe79b7cfabab6a4178f415fe3321c2baf4394d Mon Sep 17 00:00:00 2001
From: "Moritz Schubotz (physikerwelt)" <wiki@physikerwelt.de>
Date: Sun, 28 Apr 2019 13:09:02 +0200
Subject: [PATCH] Update publicationlist by bot

---
 support/commitPub.sh | 10 ++++++++++
 support/compile.sh   |  1 +
 2 files changed, 11 insertions(+)
 create mode 100755 support/commitPub.sh

diff --git a/support/commitPub.sh b/support/commitPub.sh
new file mode 100755
index 0000000..dbcd92a
--- /dev/null
+++ b/support/commitPub.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+[ -z "$TRAVIS" ] && exit 1 || echo "skip commit. Travis environment variable not set."
+gpg --import bibbot.asc
+git config --global user.email "bibbot@ckurs.de"
+git config --global user.name "BibBot"
+git config --global user.signingkey "1617C27854592471"
+git commit -S -m "Update publication list" docs/publist.html
+git remote add http https://${GITHUB_TOKEN}@github.com/ag-gipp/bib.git
+git push http HEAD:$TRAVIS_BRANCH
+exit 1
diff --git a/support/compile.sh b/support/compile.sh
index 5605147..2925a5e 100755
--- a/support/compile.sh
+++ b/support/compile.sh
@@ -8,3 +8,4 @@ cp allRefs.pdf ../../main.pdf
 cd ../..
 python3 support/issue.py
 support/pubHtml
+git diff -w docs/publist.html --exit-code || support/commitPub.sh
-- 
GitLab