mirror of
https://github.com/0intro/wmii
synced 2024-11-22 05:42:05 +03:00
[debian] Add util/genchangelog.
This commit is contained in:
parent
f7972993f3
commit
c738bfc8e7
5
Makefile
5
Makefile
@ -20,10 +20,7 @@ deb-dep:
|
|||||||
|
|
||||||
DISTRO = unstable
|
DISTRO = unstable
|
||||||
deb:
|
deb:
|
||||||
if [ -d .hg ]; \
|
$(ROOT)/util/genchangelog wmii-hg $(VERSION) $(DISTRO)
|
||||||
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@suckless.org> "$$0"\n"}'; \
|
|
||||||
fi >debian/changelog || true
|
|
||||||
dpkg-buildpackage -rfakeroot -b -nc
|
dpkg-buildpackage -rfakeroot -b -nc
|
||||||
[ -d .hg ] && hg revert debian/changelog || true
|
[ -d .hg ] && hg revert debian/changelog || true
|
||||||
|
|
||||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
|||||||
wmii-hg (hg2728) unstable; urgency=low
|
wmii-hg (2728) unstable; urgency=low
|
||||||
|
|
||||||
* Remove long deprecated special treatment of the '!' tag.
|
* Remove long deprecated special treatment of the '!' tag.
|
||||||
|
|
||||||
|
30
util/genchangelog
Executable file
30
util/genchangelog
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -ef
|
||||||
|
|
||||||
|
ifs="$(echo)"
|
||||||
|
name=$1
|
||||||
|
vers=$2
|
||||||
|
dist=$3
|
||||||
|
desc="Upstream build"
|
||||||
|
auth="Kris Maglione <kris@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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user