Skip to content

build: fix to altool check in notarize.sh#1266

Merged
ErikBjare merged 2 commits intoActivityWatch:masterfrom
Wpc-121:bug_001
Apr 18, 2026
Merged

build: fix to altool check in notarize.sh#1266
ErikBjare merged 2 commits intoActivityWatch:masterfrom
Wpc-121:bug_001

Conversation

@Wpc-121
Copy link
Copy Markdown
Contributor

@Wpc-121 Wpc-121 commented Apr 18, 2026

修复notarization_method未正确设置的问题,将altool检查逻辑移至else块中

修复notarization_method未正确设置的问题,将altool检查逻辑移至else块中
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 18, 2026

Greptile Summary

This PR fixes a two-part bug in the notarization tool-detection logic of scripts/notarize.sh. Previously, the altool check ran unconditionally after the notarytool check, so if both tools were present notarization_method would always be overwritten to run_altool; the check also had a stray output=xcrun prefix that ran altool with a spurious environment variable. Moving the altool block into the else branch correctly makes it a true fallback, and removing the prefix makes the availability probe syntactically clean. A typo ("Fallbqck") is also fixed.

Confidence Score: 5/5

Safe to merge — the logic fix is correct and the only remaining finding is a minor style suggestion on the availability probe.

The change is a clean, well-scoped bug fix with no new logic introduced. The single remaining comment is a P2 style suggestion (using xcrun -f as a safer availability probe) that does not block merge.

No files require special attention.

Important Files Changed

Filename Overview
scripts/notarize.sh Fixes tool-detection logic so altool is only checked as a fallback when notarytool is absent; also removes the bogus output=xcrun env-var prefix and fixes a typo "Fallbqck".

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Start: notarization_method=exit] --> B{xcrun notarytool\navailable?}
    B -- Yes --> C[notarization_method=run_notarytool]
    B -- No --> D{xcrun altool\navailable?}
    D -- Yes --> E[notarization_method=run_altool]
    D -- No --> F[notarization_method=exit]
    C --> G{method = exit?}
    E --> G
    F --> G
    G -- Yes --> H[echo error & exit]
    G -- No --> I{app dir exists?}
    I -- Yes --> J[zip & notarize app\nstaple app]
    I -- No --> K[skip app]
    J --> L{dmg exists?}
    K --> L
    L -- Yes --> M[notarize dmg\nstaple dmg]
    L -- No --> N[skip dmg]
Loading

Reviews (1): Last reviewed commit: "fix(scripts): 修复notarize.sh中条件判断逻辑错误" | Re-trigger Greptile

Comment thread scripts/notarize.sh Outdated
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@ErikBjare ErikBjare changed the title .2059806565729300:f00fbd7335dbf55ec3c732b58febc518_69e33d6ab13256d09ece805a.69e33ea6b13256d09ece805e.69e33ea67afba9383018b930:Trae CN.T(2026/4/18 16:19:50) build: fix to altool check in notarize.sh Apr 18, 2026
@ErikBjare ErikBjare merged commit 8877798 into ActivityWatch:master Apr 18, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants