Exemple #1
0
    def build_bundle(self, s, l, term):

        bundle = s.resolve_bundle(term)
        bundle.library = l
        bundle.clean()
        bundle.pre_prepare()
        bundle.prepare()
        bundle.post_prepare()
        bundle.pre_build()
        bundle.build()
        bundle.post_build()
        bundle.install()
Exemple #2
0
    def build_bundle(self, s, l, term):

        bundle = s.resolve_bundle(term)
        bundle.library = l
        bundle.clean()
        bundle.pre_prepare()
        bundle.prepare()
        bundle.post_prepare()
        bundle.pre_build()
        bundle.build()
        bundle.post_build()
        bundle.install()
Exemple #3
0
    def test_versions(self):
        import testbundle.bundle
        from databundles.run import get_runconfig
        idnt = self.bundle.identity
       
        #Test.rm_rf(self.bundle.filesystem.build_path())

        l = self.get_library()
        print "Database: ", l.database.dsn

        vnames = {}
        name = None
        
        for i in [1,2,3]:
            idnt.revision = i

            bundle = Bundle()  
            bundle.config.rewrite(identity=idnt.to_dict())
            get_runconfig.clear()
           
            print 'Building version {}'.format(i)

            bundle = Bundle() 
             
            bundle.clean()
            bundle.prepare()
            bundle.build()
            bundle.update_configuration()

            print "Installing ", bundle.identity.vname
            l = self.get_library()
            r = l.put(bundle)
        
            name = bundle.identity.name # Same every time. 
            vnames[i] = bundle.identity.vname
        
        
        r = l.get(name)
        
        for i,vname in vnames.items():
            r = l.get(vname)
            print i, vname, r, r.identity.vname

        
        idnt.revision = 1
        self.bundle.config.rewrite(identity=idnt.to_dict())