import shutil
import subprocess
import sys
+import tarfile
from lib.util import *
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
NODE_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'node')
-DIST_HEADERS_DIR = os.path.join(DIST_DIR, 'node-{0}'.format(get_atom_shell_version()))
+DIST_HEADERS_NAME = 'node-{0}'.format(get_atom_shell_version())
+DIST_HEADERS_DIR = os.path.join(DIST_DIR, DIST_HEADERS_NAME)
BUNDLE_NAME = 'Atom.app'
BUNDLE_DIR = os.path.join(SOURCE_ROOT, 'out', 'Release', BUNDLE_NAME)
rm_rf(DIST_DIR)
os.makedirs(DIST_DIR)
- force_build()
- copy_binaries()
+ # force_build()
+ # copy_binaries()
copy_headers()
copy_license()
create_version()
- create_zip()
+ # create_zip()
+ create_header_tarball()
def force_build():
subprocess.check_call(['zip', '-r', '-y', zip_file] + files)
+def create_header_tarball():
+ with scoped_cwd(DIST_DIR):
+ tarball = tarfile.open(name=DIST_HEADERS_DIR + '.tar.gz', mode='w:gz')
+ tarball.add(DIST_HEADERS_NAME)
+ tarball.close()
+
+
def copy_source_file(source):
relative = os.path.relpath(source, start=NODE_DIR)
destination = os.path.join(DIST_HEADERS_DIR, relative)