chiark / gitweb /
Autogenerate a source tarball for every version of every app we build
authorCiaran Gultnieks <ciaran@ciarang.com>
Sun, 2 Jan 2011 23:26:12 +0000 (23:26 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Sun, 2 Jan 2011 23:26:12 +0000 (23:26 +0000)
build.py

index b0a525b79d337f27dec90d6fa3b768d33b1f72ab..5a8cb150d2eb5cb40982ecc62d925d8b643fede2 100644 (file)
--- a/build.py
+++ b/build.py
@@ -23,6 +23,7 @@ import glob
 import subprocess
 import re
 import zipfile
+import tarfile
 import md5
 from xml.dom.minidom import Document
 from optparse import OptionParser
@@ -145,6 +146,13 @@ for app in apps:
             if thisbuild.has_key('rm'):
                 os.remove(os.path.join(root_dir, thisbuild['rm']))
 
+            #Build the source tarball right before we build the relase...
+            tarname = app['id'] + '_' + thisbuild['vercode'] + '_src'
+            tarball = tarfile.open(os.path.join(unsigned_dir,
+                tarname + '.tar.gz'), "w:gz")
+            tarball.add(build_dir, tarname)
+            tarball.close()
+
             # Build the release...
             p = subprocess.Popen(['ant','release'], cwd=root_dir, 
                     stdout=subprocess.PIPE)