[debian-edu-commits] [Git][debian-edu/debian-edu-doc][master] 2 commits: debian/mail_stats_to_list: improve error handling

Holger Levsen (@holger) gitlab at salsa.debian.org
Sun Nov 28 14:13:20 GMT 2021



Holger Levsen pushed to branch master at Debian Edu / debian-edu-doc


Commits:
a0a96a05 by Holger Levsen at 2021-11-28T15:04:35+01:00
debian/mail_stats_to_list: improve error handling

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
fd8c4955 by Holger Levsen at 2021-11-28T15:06:02+01:00
release as 2.12.5

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- debian/changelog
- debian/mail_stats_to_list


Changes:

=====================================
debian/changelog
=====================================
@@ -1,4 +1,4 @@
-debian-edu-doc (2.12.5) UNRELEASED; urgency=medium
+debian-edu-doc (2.12.5) unstable; urgency=medium
 
   * Update Debian Edu Bookworm manual from the wiki.
   * Update Debian Edu Bullseye manual from the wiki.
@@ -15,7 +15,10 @@ debian-edu-doc (2.12.5) UNRELEASED; urgency=medium
   * Buster manual:
     - Spanish: Eulalio Barbero Espinosa
 
- -- Frans Spiesschaert <Frans.Spiesschaert at yucom.be>  Fri, 05 Nov 2021 22:48:56 +0100
+  [ Holger Levsen ]
+  * debian/mail_stats_to_list: improve error handling.
+
+ -- Holger Levsen <holger at debian.org>  Sun, 28 Nov 2021 15:05:25 +0100
 
 debian-edu-doc (2.12.4) unstable; urgency=medium
 


=====================================
debian/mail_stats_to_list
=====================================
@@ -28,12 +28,23 @@
 
 export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
 set -x
+
+report_problem(){
+	echo "Problem running git $1 (return status $2) in paradis.debian.org:~holger/debian-edu-doc - please fix." | mail -s "problem with debian-edu-doc status mails" holger at layer-acht.org
+	exit 1
+}
+
 cd ~holger/debian-edu-doc
-git pull > /dev/null 2>&1 && git status 2>&1
+git pull > /dev/null 2>&1
 RESULT=$?
 if [ $RESULT -ne 0 ] ; then
-	echo "Problem with git clone (status '$RESULT') at paradis.debian.org:~holger/debian-edu-doc - please fix." | mail -s "problem with debian-edu-doc status mails" holger at layer-acht.org
-	exit 1
+	report_problem pull $RESULT
+fi
+
+git status 2>&1
+RESULT=$?
+if [ $RESULT -ne 0 ] ; then
+	report_problem status $RESULT
 fi
 
 #



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-doc/-/compare/6610f661ff52dff2d20b033b92057d8f988c4e6e...fd8c4955770969cffafb0eb9463d360b735fb3f7

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-doc/-/compare/6610f661ff52dff2d20b033b92057d8f988c4e6e...fd8c4955770969cffafb0eb9463d360b735fb3f7
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20211128/29d8a895/attachment-0001.htm>


More information about the debian-edu-commits mailing list