diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ed45db9..d28b435 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,17 +7,6 @@ trigger: - main - refs/tags/* -variables: -# Tags starting with "v" are considered a release and should sign -# and publish the binaries. -- name: CR_RELEASE - value: $[startsWith(variables['Build.SourceBranch'], 'refs/tags/v')] -# Main Python version for building distributables. -- name: CR_PY_VERSION - value: '3.10' -# Link the group of Apple passwords from pipeline library. -- group: 'Apple IDs' - stages: - stage: Quality_Control displayName: Quality Control @@ -73,6 +62,16 @@ stages: displayName: Build Distributables dependsOn: Quality_Control condition: succeeded('Quality_Control') + variables: + # Tags starting with "v" are considered a release and should sign + # and publish the binaries. + - name: CR_RELEASE + value: $[startsWith(variables['Build.SourceBranch'], 'refs/tags/v')] + # Main Python version for building distributables. + - name: CR_PY_VERSION + value: '3.10' + # Link the group of Apple passwords from pipeline library. + - group: 'Apple IDs' jobs: - job: windows10 diff --git a/cr.spec b/cr.spec index e16ae7b..de00770 100644 --- a/cr.spec +++ b/cr.spec @@ -1,10 +1,18 @@ +import platform, os + +codesign_identity = None +strip = False + # If this is being run in a release pipeline, sign the executable with # codesign_identity for macos. -import os -codesign_identity = None if os.environ.get("CR_RELEASE", "").lower() == "true": codesign_identity = "Developer ID Application: CodeRed LLC (26334S6DB6)" +# Apply symbol table stripping from the executable on Linux, +# to reduce file size. +if platform.system() == "Linux": + strip = True + block_cipher = None a = Analysis( @@ -38,7 +46,7 @@ exe = EXE( icon="icon/cr.ico", debug=False, bootloader_ignore_signals=False, - strip=False, + strip=strip, upx=False, upx_exclude=[], runtime_tmpdir=None,