summaryrefslogtreecommitdiff
path: root/bin/bugzilla_mesa.sh
diff options
context:
space:
mode:
authorJordan Justen <jljusten@gmail.com>2013-05-26 17:31:38 -0700
committerJordan Justen <jljusten@gmail.com>2013-05-26 17:31:38 -0700
commit8747ceabb6bdeed66bec6aff695f94fda6ce5592 (patch)
tree4a989b4fa4fcfbc8e3be2a3f4908637c0745c4f3 /bin/bugzilla_mesa.sh
parent61aded1dd7959a6dbfbfdab7e99405f7e263dcf8 (diff)
parentaa72c1d7c32007c06d2478524ca08837e5050ba1 (diff)
Merge remote-tracking branch 'debian/ubuntu-raring' into mesa-9.1-precisemesa-9.1-precise
Diffstat (limited to 'bin/bugzilla_mesa.sh')
-rwxr-xr-xbin/bugzilla_mesa.sh52
1 files changed, 52 insertions, 0 deletions
diff --git a/bin/bugzilla_mesa.sh b/bin/bugzilla_mesa.sh
new file mode 100755
index 0000000000..491ca0e7c0
--- /dev/null
+++ b/bin/bugzilla_mesa.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+# This script is used to generate the list of fixed bugs that
+# appears in the release notes files, with HTML formatting.
+#
+# Note: This script could take a while until all details have
+# been fetched from bugzilla.
+#
+# Usage examples:
+#
+# $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3
+# $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 > bugfixes
+# $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 | tee bugfixes
+# $ DRYRUN=yes bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3
+# $ DRYRUN=yes bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 | wc -l
+
+
+# regex pattern: trim before url
+trim_before='s/.*\(http\)/\1/'
+
+# regex pattern: trim after url
+trim_after='s/\(show_bug.cgi?id=[0-9]*\).*/\1/'
+
+# regex pattern: always use https
+use_https='s/http:/https:/'
+
+# extract fdo urls from commit log
+urls=$(git log $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before -e $trim_after -e $use_https | sort | uniq)
+
+# if DRYRUN is set to "yes", simply print the URLs and don't fetch the
+# details from fdo bugzilla.
+#DRYRUN=yes
+
+if [ "x$DRYRUN" = xyes ]; then
+ for i in $urls
+ do
+ echo $i
+ done
+else
+ echo "<ul>"
+ echo ""
+
+ for i in $urls
+ do
+ id=$(echo $i | cut -d'=' -f2)
+ summary=$(wget --quiet -O - $i | grep -e '<title>.*</title>' | sed -e 's/ *<title>Bug [0-9]\+ &ndash; \(.*\)<\/title>/\1/')
+ echo "<li><a href=\"$i\">Bug $id</a> - $summary</li>"
+ echo ""
+ done
+
+ echo "</ul>"
+fi