From cbb2872ab0d565ff26e0bd088f7f3255b8e771b5 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 4 Oct 2019 16:17:42 -0700 Subject: [PATCH] Make a tarball from the docset --- build.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build.py b/build.py index fa44ec5a..60559b52 100755 --- a/build.py +++ b/build.py @@ -1015,6 +1015,22 @@ def cmd_docset_py(options, args): msg('Removing sidebar from docset pages...') _removeSidebar(opj('dist', name+'.docset', 'Contents', 'Resources', 'Documents')) + # build the tarball + msg('Archiving Phoenix docset...') + rootname = "wxPython-docset-{}".format(cfg.VERSION) + tarfilename = "dist/{}.tar.gz".format(rootname) + if os.path.exists(tarfilename): + os.remove(tarfilename) + tarball = tarfile.open(name=tarfilename, mode="w:gz") + tarball.add(opj('dist', name+'.docset'), name+'.docset', filter=_setTarItemPerms) + tarball.close() + + if options.upload: + uploadPackage(tarfilename, options) + + msg("Docset file built at %s" % tarfilename) + + def _removeSidebar(path): """