~zaber/openerp-tools/zaber

« back to all changes in this revision

Viewing changes to packaging61/package61.py

  • Committer: Aki Mimoto
  • Date: 2013-03-22 17:11:50 UTC
  • Revision ID: aki+launchpad@zaber.com-20130322171150-2ck9gn7x17y4k95j
[IMP] Create a .deb package that will be manually uploaded to server instead

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
    shutil.rmtree(join(o.work,'dist'))
82
82
 
83
83
def debian(o):
84
 
    cmd=['sed','-i','1s/^.*$/openerp (%s-%s-1) precise; urgency=low/'%(o.version,o.timestamp),'debian/changelog']
85
 
    system(cmd,o.work)
86
 
    cmd=['dpkg-buildpackage','-rfakeroot', '-S']
87
 
    system(cmd,o.work)
88
 
    cmd=['dput', 'ppa:donkirkby', 'openerp_%s-1_source.changes' % o.version_full]
89
 
    print ' '.join(cmd)
90
 
    system(cmd, o.build)
 
84
    cmd=['sed','-i','1s/^.*$/openerp (%s-%s-1) testing; urgency=low/'%(o.version,o.timestamp),'debian/changelog']
 
85
    system(cmd,o.work)
 
86
    cmd=['dpkg-buildpackage','-rfakeroot']
 
87
    system(cmd,o.work)
 
88
    l = glob.glob(join(o.build,'openerp_*'))
 
89
    for i in l:
 
90
        shutil.move(i,o.pkg)
91
91
 
92
92
class KVM(object):
93
93
    def __init__(self, o, image, ssh_key=''):
302
302
    #bdist_rpm(o)
303
303
    # deb
304
304
    debian(o)
305
 
#    if os.path.isfile(o.vm_debian_image):
306
 
#        KVMDebianTestDeb(o, o.vm_debian_image, o.vm_debian_ssh_key).start()
307
 
#    # publish
308
 
#    publish(o)
309
 
#    cleanup(o)
 
305
    if os.path.isfile(o.vm_debian_image):
 
306
        KVMDebianTestDeb(o, o.vm_debian_image, o.vm_debian_ssh_key).start()
 
307
    # publish
 
308
    publish(o)
 
309
    cleanup(o)
310
310
    print time.strftime("Finished at %H:%M",time.gmtime())
311
311
 
312
312
if __name__ == '__main__':