def create_zip():
- print "Zipping distribution..."
zip_file = os.path.join(SOURCE_ROOT, 'dist', 'atom-shell.zip')
safe_unlink(zip_file)
with scoped_cwd(DIST_DIR):
- files = ['Atom.app', 'LICENSE', 'version']
- subprocess.check_call(['zip', '-r', '-y', zip_file] + files)
+ files = TARGET_BINARIES[TARGET_PLATFORM] + \
+ TARGET_DIRECTORIES[TARGET_PLATFORM] + \
+ ['LICENSE', 'version']
+ make_zip(zip_file, files)
def create_header_tarball():
with zipfile.ZipFile(zip_path) as z:
z.extractall(destination)
+def make_zip(zip_file_path, files):
+ safe_unlink(zip_file_path)
+ if sys.platform == 'darwin':
+ subprocess.check_call(['zip', '-r', '-y', zip_file_path] + files)
+ else:
+ zip_file = zipfile.ZipFile(zip_file_path, "w")
+ for filename in files:
+ zip_file.write(filename, filename)
+ zip_file.close()
+
def rm_rf(path):
try: