Skip to content
Snippets Groups Projects
Commit a700a113 authored by Aaron Bohy's avatar Aaron Bohy Committed by Simon Lejeune
Browse files

[ADD] Packaging: also publish source dist .zip file

parent 21fe55df
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,7 @@ PUBLISH_DIRS = { ...@@ -52,6 +52,7 @@ PUBLISH_DIRS = {
} }
EXTENSIONS = [ EXTENSIONS = [
'.tar.gz', '.tar.gz',
'.zip',
'.deb', '.deb',
'.dsc', '.dsc',
'.changes', '.changes',
...@@ -269,8 +270,9 @@ def _prepare_build_dir(o): ...@@ -269,8 +270,9 @@ def _prepare_build_dir(o):
shutil.move(i, join(o.build_dir, 'openerp/addons')) shutil.move(i, join(o.build_dir, 'openerp/addons'))
def build_tgz(o): def build_tgz(o):
system(['python2', 'setup.py', '--quiet', 'sdist'], o.build_dir) system(['python2', 'setup.py', 'sdist', '--quiet', '--formats=gztar,zip'], o.build_dir)
system(['cp', glob('%s/dist/odoo-*.tar.gz' % o.build_dir)[0], '%s/odoo.tar.gz' % o.build_dir]) system(['cp', glob('%s/dist/odoo-*.tar.gz' % o.build_dir)[0], '%s/odoo.tar.gz' % o.build_dir])
system(['cp', glob('%s/dist/odoo-*.zip' % o.build_dir)[0], '%s/odoo.zip' % o.build_dir])
def build_deb(o): def build_deb(o):
deb = pexpect.spawn('dpkg-buildpackage -rfakeroot -k%s' % GPGID, cwd=o.build_dir) deb = pexpect.spawn('dpkg-buildpackage -rfakeroot -k%s' % GPGID, cwd=o.build_dir)
...@@ -451,7 +453,7 @@ def main(): ...@@ -451,7 +453,7 @@ def main():
try: try:
if not o.no_testing: if not o.no_testing:
test_tgz(o) test_tgz(o)
published_files = publish(o, 'tarball', ['odoo.tar.gz']) published_files = publish(o, 'tarball', ['odoo.tar.gz', 'odoo.zip'])
except Exception, e: except Exception, e:
print("Won't publish the tgz release.\n Exception: %s" % str(e)) print("Won't publish the tgz release.\n Exception: %s" % str(e))
if not o.no_debian: if not o.no_debian:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment