Skip to content

Commit

Permalink
Update Deploy.py
Browse files Browse the repository at this point in the history
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
  • Loading branch information
LorenEteval committed May 15, 2024
1 parent f1e1617 commit b7ac00c
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions Deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
import argparse
import subprocess

try:
from nuitka.Version import getNuitkaVersion
except ImportError:
raise
else:
NUITKA_VERSION = getNuitkaVersion()

logging.basicConfig(
format='[%(asctime)s] [%(name)s] [%(levelname)s] %(message)s',
level=logging.INFO,
Expand Down Expand Up @@ -79,10 +86,16 @@
f'macOS-10.9-{PLATFORM_MACHINE.lower()}'
)
else:
ARTIFACT_NAME = (
f'{APPLICATION_NAME}-{__version__}-'
f'macOS-11.0-{PLATFORM_MACHINE.lower()}'
)
if versionToValue(NUITKA_VERSION) <= versionToValue('1.8.6'):
ARTIFACT_NAME = (
f'{APPLICATION_NAME}-{__version__}-'
f'macOS-11.0-{PLATFORM_MACHINE.lower()}'
)
else:
ARTIFACT_NAME = (
f'{APPLICATION_NAME}-{__version__}-'
f'macOS-12.0-{PLATFORM_MACHINE.lower()}'
)
else:
ARTIFACT_NAME = ''

Expand Down Expand Up @@ -168,15 +181,6 @@ def main():

sys.exit(0)

try:
import nuitka
except ImportError:
# Any non-exit exceptions

logger.error('please install nuitka to run this script')

sys.exit(-1)

try:
logger.info('building')

Expand Down

0 comments on commit b7ac00c

Please sign in to comment.