chiark / gitweb /
Debian build: ./newVersion updates debian/changelog too.
[wiringPi.git] / newVersion
index bab6dc581bf96b322adbad8290fa065040399034..e89ae7e471b63d5bb38898b8aa02de3287c66a71 100755 (executable)
@@ -41,3 +41,22 @@ Description: The wiringPi libraries, headers and gpio command
   Libraries to allow GPIO access on a Raspberry Pi from C and C++
   programs as well as from the command-line
 EOF
+
+changelog=$(dpkg-parsechangelog)
+olddebversion=$(printf "%s" "$changelog" |
+ sed -n '/^Version: / { s/^Version: //; p; q }')
+newversion=`cat VERSION`
+
+if [ x"$olddebversion" != x"$newversion" ]; then
+   clog=debian/changelog
+   datestamp=$(date -R)
+   cat <<END - $clog >$clog.new
+wiringpi ($newversion) RASPBIAN; urgency=medium
+
+  * New upstream version
+
+ -- Gordon Henderson <projects@drogon.net>  $datestamp
+
+END
+  mv -f $clog.new $clog
+fi