Makefile: build target
authorKonstantin Stepanov <kstep@p-nut.info>
Sun, 19 Dec 2010 23:24:32 +0000 (01:24 +0200)
committerKonstantin Stepanov <kstep@p-nut.info>
Mon, 20 Dec 2010 00:14:58 +0000 (02:14 +0200)
Makefile
genchangelog [new file with mode: 0755]

index 2c833ae..41cbc01 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -39,5 +39,12 @@ debclean:
 deb: debclean
        debuild binary-indep
 
-.PHONY: all install uninstall clean debclean deb
+build: debclean
+       ./genchangelog $(B)
+       git commit -m "changelog updated" ./debian/changelog
+       git tag -f v$(B)
+       git push -f origin v$(B)
+       $(MAKE) deb
+
+.PHONY: all install uninstall clean debclean deb build
 
diff --git a/genchangelog b/genchangelog
new file mode 100755 (executable)
index 0000000..4f8fa17
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+BUILD=${1%.0}
+
+cat <<CHANGELOG > ./debian/changelog.new
+dbuscron (${BUILD}-1) unstable; urgency=low
+
+  * Next release:
+
+    `git shortlog $(git describe --tags --abbrev=0)..HEAD`
+
+ -- Konstantin Stepanov <kstep@p-nut.info>  `LC_ALL=C date +'%a, %e %b %Y %T %z'`
+
+CHANGELOG
+
+cat ./debian/changelog >> ./debian/changelog.new && mv -f ./debian/changelog.new ./debian/changelog
+