Esempio n. 1
0
    def execute(self, args):
        if len (args) != 1:
            print "usage: elbe db build <project_dir>"
            return

        db = ElbeDB()
        db.set_busy( args[0], [ "empty_project", "needs_build", "has_changes",
                                "build_done", "build_failed" ] )
        try:
            ep = db.load_project( args[0] )
            ep.build( skip_debootstrap = True )
            db.update_project_files( ep )
        except Exception as e:
            db.update_project_files( ep )
            db.reset_busy( args[0], "build_failed" )
            print e
            return
        db.reset_busy( args[0], "build_done" )
Esempio n. 2
0
    def execute(self, args):
        if len (args) != 1:
            print "usage: elbe db build <project_dir>"
            return

        db = ElbeDB()
        db.set_busy( args[0], [ "empty_project", "needs_build", "has_changes",
                                "build_done", "build_failed" ] )
        try:
            ep = db.load_project( args[0] )
            ep.build( skip_debootstrap = True )
            db.update_project_files( ep )
        except Exception as e:
            db.update_project_files( ep )
            db.reset_busy( args[0], "build_failed" )
            print e
            return
        db.reset_busy( args[0], "build_done" )
Esempio n. 3
0
    def execute(self, args):
        if len(args) != 1:
            print("usage: elbe db build <project_dir>")
            return

        db = ElbeDB()
        db.set_busy(args[0], [
            "empty_project", "needs_build", "has_changes", "build_done",
            "build_failed"
        ])
        try:
            ep = db.load_project(args[0])
            ep.build()
            db.update_project_files(ep)
        # pylint: disable=broad-except
        except Exception as e:
            db.update_project_files(ep)
            db.reset_busy(args[0], "build_failed")
            print(str(e))
            return
        db.reset_busy(args[0], "build_done")