[Treepkg-commits] r136 - trunk/bin

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Nov 14 20:41:21 CET 2008


Author: bh
Date: 2008-11-14 20:41:21 +0100 (Fri, 14 Nov 2008)
New Revision: 136

Modified:
   trunk/bin/treepkgbuilder.py
Log:
Add build command to bin/treepkgbuilder.py


Modified: trunk/bin/treepkgbuilder.py
===================================================================
--- trunk/bin/treepkgbuilder.py	2008-11-14 19:41:03 UTC (rev 135)
+++ trunk/bin/treepkgbuilder.py	2008-11-14 19:41:21 UTC (rev 136)
@@ -128,6 +128,26 @@
         self.get_builder().login()
 
 
+class BuildCommand(Command):
+
+    names = ("build",)
+
+    def create_parser(self):
+        parser = super(BuildCommand, self).create_parser()
+        parser.add_option("--logfile", help=("The file for the build log."))
+        parser.add_option("--binary-dir",
+                          help=("Directory for the binary packages."))
+        return parser
+
+    def run(self):
+        if len(self.rest) != 1:
+            print >>sys.stderr, "Exactly one .dsc file must be specified"
+            sys.exit(1)
+        dsc_file = self.rest[0]
+        self.get_builder().build(dsc_file, binary_dir=self.opts.binary_dir,
+                                 logfile=self.opts.logfile)
+
+
 class HelpCommand(Command):
 
     names = ("help", "--help", "-h")



More information about the Treepkg-commits mailing list