From ff8c40a4e5a5c50572449d52754639b870dc5981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Sun, 13 Jun 2010 10:27:12 +0200 Subject: Automatically update the debian changelog. diff --git a/BuildTools/UpdateDebianChangelog.py b/BuildTools/UpdateDebianChangelog.py new file mode 100755 index 0000000..6615ab1 --- /dev/null +++ b/BuildTools/UpdateDebianChangelog.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +import sys, re, email.utils + +assert(len(sys.argv) == 3) + +version = sys.argv[2] + +changelog = open(sys.argv[1]) +last_version_line = changelog.readline() +changelog.close() + +project = "" +last_version = "" +m = re.match("(\w+) \((.*)\)", last_version_line) +if m : + project = m.group(1) + last_version = m.group(2) + +if last_version != version : + changelog = open(sys.argv[1]) + changelog_data = changelog.read() + changelog.close() + changelog = open(sys.argv[1], "w") + changelog.write(project + " (" + version + ")" + " unstable; urgency=low\n\n") + changelog.write(" * Upstream development snapshot\n\n") + changelog.write(" -- Remko Tron\xc3\xa7on " + email.utils.formatdate() + "\n") + changelog.write("\n") + changelog.write(changelog_data) + changelog.close() + diff --git a/BuildTools/package_debian.sh b/BuildTools/package_debian.sh deleted file mode 100755 index 3d01243..0000000 --- a/BuildTools/package_debian.sh +++ /dev/null @@ -1,10 +0,0 @@ -VERSION=1.0 -PACKAGE=swift-$VERSION - -rm -rf $PACKAGE -git archive --format=tar --prefix=$PACKAGE/ HEAD | tar x -cp -r Swift/Packaging/Debian $PACKAGE/debian -pushd $PACKAGE -SWIFT_VERSION=$VERSION dpkg-buildpackage -rfakeroot -popd -rm -rf $PACKAGE diff --git a/Swift/Packaging/Debian/package.sh b/Swift/Packaging/Debian/package.sh index 5e93ee9..9c9dae1 100755 --- a/Swift/Packaging/Debian/package.sh +++ b/Swift/Packaging/Debian/package.sh @@ -16,6 +16,7 @@ echo "Checking out a fresh copy ..." rm -rf $DIRNAME git clone ../../../.git $DIRNAME ln -s Swift/Packaging/Debian/debian $DIRNAME/debian +../../../BuildTools/UpdateDebianChangelog.py $DIRNAME/debian/changelog $VERSION echo "Building ..." cd $DIRNAME -- cgit v0.10.2-6-g49f6