Introduced --debug option for build.

This commit is contained in:
emiliano.vavassori 2024-08-22 23:31:52 +02:00
parent 3c7edcfe09
commit 8b8aadd911
1 changed files with 4 additions and 2 deletions

View File

@ -59,8 +59,9 @@ def getversion(query, jsonout, default_to_current):
@click.option('--updatable', '-u', is_flag=True, default=False, help="Create an updatable AppImage (compatible with zsync2). Default: not updatable")
@click.option('--download-path', '-d', default='./downloads', type=str, help="Path to the download folder. Default: ./downloads")
@click.option('--repo-path', '-r', default='.', type=str, help="Path to the final storage of the AppImage. Default: current directory")
@click.option('--debug', 'debug', is_flag=True, default=False, help="Activate debug options.")
@click.argument('query')
def build(arch, language, offline, portable, updatable, download_path, repo_path, check, checksums, sign, keep, query):
def build(arch, language, offline, portable, updatable, download_path, repo_path, check, checksums, sign, keep, query, debug):
"""Builds an Appimage with the provided options."""
# Multiple query support
@ -110,7 +111,8 @@ def build(arch, language, offline, portable, updatable, download_path, repo_path
appbuild.checksums()
appbuild.publish()
del appbuild
if not debug:
del appbuild
if not keep:
shutil.rmtree(downloadpath)