~loyalinfo/openerp-tools/trunk

« back to all changes in this revision

Viewing changes to packaging70/package70.py

  • Committer: Stephane Wirtel
  • Date: 2013-04-17 09:51:38 UTC
  • Revision ID: stw@openerp.com-20130417095138-g896no50rzrzuh34
[IMP] packaging70: The user can disable a part of the packaging

Show diffs side-by-side

added added

removed removed

Lines of Context:
256
256
    op.add_option("", "--vm-debian-ssh-key", default='/home/odoo/vm/debian6/debian6_id_rsa', help="%default")
257
257
    op.add_option("", "--vm-winxp-image", default='/home/odoo/vm/winxp26/winxp26.vdi', help="%default")
258
258
    op.add_option("", "--vm-winxp-ssh-key", default='/home/odoo/vm/winxp26/id_rsa', help="%default")
 
259
    op.add_option("", "--no-publish", action="store_true", help="don't publish the packages")
 
260
    op.add_option("", "--no-debian", action="store_true", help="don't build the debian package")
 
261
    op.add_option("", "--no-rpm", action="store_true", help="don't build the rpm package")
 
262
    op.add_option("", "--no-tarball", action="store_true", help="don't build the tarball")
 
263
    op.add_option("", "--no-windows", action="store_true", help="don't build the windows package")
259
264
    (o, args) = op.parse_args()
260
265
    # derive other options
261
266
    o.timestamp = time.strftime("%Y%m%d-%H%M%S",time.gmtime())
278
283
    try:
279
284
        version(o)
280
285
        # exe
281
 
        if os.path.isfile(o.vm_winxp_image):
282
 
            KVMWinBuildExe(o, o.vm_winxp_image, o.vm_winxp_ssh_key).start()
283
 
            KVMWinTestExe(o, o.vm_winxp_image, o.vm_winxp_ssh_key).start()
 
286
        if not o.no_windows:
 
287
            if os.path.isfile(o.vm_winxp_image):
 
288
                KVMWinBuildExe(o, o.vm_winxp_image, o.vm_winxp_ssh_key).start()
 
289
                KVMWinTestExe(o, o.vm_winxp_image, o.vm_winxp_ssh_key).start()
284
290
        # tgz
285
 
        sdist(o)
286
 
        if os.path.isfile(o.vm_debian_image):
287
 
            KVMDebianTestTgz(o, o.vm_debian_image, o.vm_debian_ssh_key).start()
 
291
        if not o.no_tarball:
 
292
            sdist(o)
 
293
            if os.path.isfile(o.vm_debian_image):
 
294
                KVMDebianTestTgz(o, o.vm_debian_image, o.vm_debian_ssh_key).start()
288
295
        # rpm
289
 
        bdist_rpm(o)
 
296
        if not o.no_rpm:
 
297
            bdist_rpm(o)
290
298
        # deb
291
 
        debian(o)
292
 
        if os.path.isfile(o.vm_debian_image):
293
 
            KVMDebianTestDeb(o, o.vm_debian_image, o.vm_debian_ssh_key).start()
 
299
        if not o.no_debian:
 
300
            debian(o)
 
301
            if os.path.isfile(o.vm_debian_image):
 
302
                KVMDebianTestDeb(o, o.vm_debian_image, o.vm_debian_ssh_key).start()
294
303
        # publish
295
 
        publish(o)
 
304
        if not o.no_publish:
 
305
            publish(o)
296
306
    finally:
297
307
        cleanup(o)
298
308