[reproducible-website] 02/03: bin/publish: Idempotent

Chris Lamb chris at chris-lamb.co.uk
Tue Apr 24 10:17:03 CEST 2018


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository reproducible-website.

commit d855c95b2a375b1f18c03809709741c2a137c1f1
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Apr 24 08:24:34 2018 +0200

    bin/publish: Idempotent
---
 bin/publish | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/bin/publish b/bin/publish
index 9fd7a12..a636ddf 100755
--- a/bin/publish
+++ b/bin/publish
@@ -27,13 +27,17 @@ then
 fi
 
 git add "${FILENAME}"
-git commit -m "published as ${URL}"
-git log -1
-git tag -s "${WEEK}" -m "Publish week ${WEEK}"
+
+if git commit -m "published as ${URL}"
+then
+	git log -1
+	git tag -s "${WEEK}" -m "Publish week ${WEEK}"
+
+	echo
+	echo "Now verify the results and run git push && git push --tags."
+fi
 
 echo
-echo "Now verify the results and run git push && git push --tags."
 echo
 echo "After publishing, Tweet this via:"
-echo
 echo "  %tweet What happened in the @ReproBuilds effort between $(tr '\n' ' ' < "${FILENAME}" | sed -n -e 's at .* effort between \([^:]*\):.*@\1 at p'): https://reproducible-builds.org/blog/posts/${WEEK}/"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/reproducible-website.git


More information about the rb-commits mailing list