Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
Added unnecessary files deletion to BGArmor build script and the rele…
Browse files Browse the repository at this point in the history
…ase list
  • Loading branch information
joelgomes1994 committed Jan 10, 2021
1 parent d180d55 commit 0e23ee8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
10 changes: 8 additions & 2 deletions source/release_files.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
# End folders with a forward slash (/)
"Create" : [
"./data/",
"./data/DELETE-ME",
"./engine/",
"./engine/Windows/",
"./engine/Linux/",
Expand All @@ -13,6 +11,7 @@
"./source/",
],
"Copy" : [
"./data/",
"./launcher/",
"./source/icons/",
"./source/tools/",
Expand All @@ -23,5 +22,12 @@
"./win-build-data.bat",
"./win-build-release.bat",
"./win-set-icons.bat",
],
"Delete" : [
"__pycache__",
"pyminifier",
"build_bgarmor.py",
"build_launcher.py",
".gitignore",
]
}
11 changes: 9 additions & 2 deletions source/tools/Common/helper_scripts/build_bgarmor.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@

print(" > Copied", elementType, "to:", path.as_posix())

for _path in glob.glob(targetPath.as_posix() + "/**/__pycache__", recursive=True):
shutil.rmtree(_path, ignore_errors=True)
print("\n> Removing unnecessary files and folders:")
for pattern in releaseFilesList["Delete"]:
for _path in glob.glob(targetPath.as_posix() + "/**/" + pattern, recursive=True):
_path = Path(_path)
if _path.is_dir():
shutil.rmtree(_path.as_posix(), ignore_errors=True)
else:
_path.unlink()
print(" > Removed:", _path)

0 comments on commit 0e23ee8

Please sign in to comment.