mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
38 lines
737 B
Python
38 lines
737 B
Python
import os
|
|
|
|
from zipfile import *
|
|
|
|
|
|
IGNORED_PATHS = [
|
|
"__pycache__",
|
|
".gitignore",
|
|
".gitmodules",
|
|
".git",
|
|
".idea",
|
|
".DS_Store",
|
|
|
|
"build",
|
|
]
|
|
|
|
VERSION = "1.3.2"
|
|
|
|
|
|
def _mk_archieve():
|
|
archieve = ZipFile("build/dcs_liberation_{}.zip".format(VERSION), "w")
|
|
archieve.writestr("start.bat", "py.exe __init__.py \"%UserProfile%\" \"{}\"".format(VERSION))
|
|
|
|
for path, directories, files in os.walk("."):
|
|
is_ignored = False
|
|
for ignored_path in IGNORED_PATHS:
|
|
if ignored_path in path:
|
|
is_ignored = True
|
|
break
|
|
|
|
if is_ignored:
|
|
continue
|
|
|
|
for file in files:
|
|
archieve.write(os.path.join(path, file))
|
|
|
|
|
|
_mk_archieve() |