Skip to content

Commit

Permalink
Merge #69: [Build] Clean up renamed dist dir when building distributi…
Browse files Browse the repository at this point in the history
…on packages.

e838114 [Build] Clean up renamed dist dir when building distribution packages. (Fuzzbawls)

Pull request description:

  When building distribution packages via pyinstaller, remove any previous/conflicting renamed dist paths.

ACKs for top commit:
  Liquid369:
    ACK e838114

Tree-SHA512: 3b33261aa21349adaccd1c0e636817ced131ebf7846ca377422a4c6e54ff225325a28fb887de67cdad8994a51e6e8adc853eb9fbfc1613e111e417cf3d326c85
  • Loading branch information
Fuzzbawls committed Jun 18, 2024
2 parents 2c3795e + e838114 commit 090ad85
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions SecurePivxMasternodeTool.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys
import platform
import os.path as os_path
import shutil
import simplejson as json
import subprocess

Expand Down Expand Up @@ -146,6 +147,8 @@ if os_type == 'win32':
os.chdir(base_dir)
# Rename dist Dir
dist_path_win = os_path.join(base_dir, f'SPMT-v{version_str}-Win64')
if os_path.exists(dist_path_win):
shutil.rmtree(dist_path_win)
os.rename(dist_path, dist_path_win)
# Check for NSIS
prog_path = os.environ["ProgramFiles(x86)"]
Expand All @@ -162,6 +165,8 @@ if os_type == 'linux':
os.chdir(base_dir)
# Rename dist Dir
dist_path_linux = os_path.join(base_dir, f'SPMT-v{version_str}-{cpu_arch}-gnu_linux')
if os_path.exists(dist_path_linux):
shutil.rmtree(dist_path_linux)
os.rename(dist_path, dist_path_linux)
# Compress dist Dir
print('Compressing Linux App Folder')
Expand All @@ -172,6 +177,8 @@ if os_type == 'darwin':
os.chdir(base_dir)
# Rename dist Dir
dist_path_mac = os_path.join(base_dir, f'SPMT-v{version_str}-{cpu_arch}-MacOS')
if os_path.exists(dist_path_mac):
shutil.rmtree(dist_path_mac)
os.rename(dist_path, dist_path_mac)
# Remove 'app' folder
print("Removing 'app' folder")
Expand Down

0 comments on commit 090ad85

Please sign in to comment.