[hackers] [wmii] [debian] Add util/genchangelog. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Wed, 7 Jul 2010 01:24:51 +0000 (UTC)

changeset: 2755:5c1b25288f47
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Tue Jul 06 21:23:15 2010 -0400
files: Makefile debian/changelog util/genchangelog
description:
[debian] Add util/genchangelog.

diff -r d7cb3ff930a7 -r 5c1b25288f47 Makefile
--- a/Makefile Fri Jul 02 00:33:09 2010 -0700
+++ b/Makefile Tue Jul 06 21:23:15 2010 -0400
@@ -20,10 +20,7 @@
 
 DISTRO = unstable
 deb:
- if [ -d .hg ]; \
- then hg tip --template 'wmii-hg ($(VERSION)) $(DISTRO); urgency=low\n\n * {desc}\n\n -- {author} {date|rfc822date}\n'; \
- else awk 'BEGIN{"date"|getline; print "wmii-hg ($(VERSION)) $(DISTRO); urgency=low\n\n * Upstream build\n\n -- Kris Maglione <jg_AT_suckless.org> "$$0"\n"}'; \
- fi >debian/changelog || true
+ $(ROOT)/util/genchangelog wmii-hg $(VERSION) $(DISTRO)
         dpkg-buildpackage -rfakeroot -b -nc
         [ -d .hg ] && hg revert debian/changelog || true
 
diff -r d7cb3ff930a7 -r 5c1b25288f47 debian/changelog
--- a/debian/changelog Fri Jul 02 00:33:09 2010 -0700
+++ b/debian/changelog Tue Jul 06 21:23:15 2010 -0400
@@ -1,4 +1,4 @@
-wmii-hg (hg2728) unstable; urgency=low
+wmii-hg (2728) unstable; urgency=low
 
   * Remove long deprecated special treatment of the '!' tag.
 
diff -r d7cb3ff930a7 -r 5c1b25288f47 util/genchangelog
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/util/genchangelog Tue Jul 06 21:23:15 2010 -0400
@@ -0,0 +1,30 @@
+#!/bin/sh
+set -ef
+
+ifs="$(echo)"
+name=$1
+vers=$2
+dist=$3
+desc="Upstream build"
+auth="Kris Maglione <kris_AT_suckless.org>"
+date=$(date +'%a, %d %b %Y %T %z')
+if hg root >/dev/null 2>&1; then
+ t() { hg log -r . --template "{$@}"; }
+ vers=$(t rev)
+ desc=$(t desc)
+ auth=$(t author)
+ date=$(t 'date|rfc822date')
+fi
+
+cat >debian/changelog.new <<!
+$name ($vers) $dist; urgency=low
+
+ * $desc
+
+ -- $auth $date
+
+$(cat debian/changelog)
+!
+
+mv debian/changelog.new debian/changelog
+
Received on Wed Jul 07 2010 - 03:24:51 CEST

This archive was generated by hypermail 2.2.0 : Wed Jul 07 2010 - 03:36:05 CEST