summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-06-13 08:27:12 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-06-13 08:32:23 (GMT)
commitff8c40a4e5a5c50572449d52754639b870dc5981 (patch)
tree2a80231a420068234c654eac99f6f736cbd6b2e2 /BuildTools
parent40499c9dffdc1ac676f66ae51ba42513a726f1cb (diff)
downloadswift-ff8c40a4e5a5c50572449d52754639b870dc5981.zip
swift-ff8c40a4e5a5c50572449d52754639b870dc5981.tar.bz2
Automatically update the debian changelog.
Diffstat (limited to 'BuildTools')
-rwxr-xr-xBuildTools/UpdateDebianChangelog.py31
-rwxr-xr-xBuildTools/package_debian.sh10
2 files changed, 31 insertions, 10 deletions
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 <dev@el-tramo.be> " + 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