Repository navigation
Return non-zero exit codes on errors in netsparkle-generate-appcast (fixes #740) - #743
Conversation
|
Hi @SENESO, I appreciate the contribution. However, at this time, I'm not going to merge it (yet). @bdovaz in #740 has already outlined a PR path for #740 and asked to start on it. Plus, this PR does not do what I asked for in #740 with using an enum for return codes and errors for easier code reading. |
Replaces magic 0/1 exit codes with a descriptive ExitCode enum so each failure has its own value (e.g. ErrorNoOutputDirectory), making the code easier to read and letting CI scripts tell errors apart.
7a59c30 to
08f98f0
Compare
|
Thanks for the feedback — I've updated the PR to use an |
|
It's okay, I haven't started yet. I'm glad about this PR—one less for me 😜 |
|
Happy to take it off your plate! Let me know if you'd like any tweaks to the approach 😄 |
| netsparkle-generate-appcast -b binary/folder -p change/log/folder | ||
|
|
||
| # Customize download URL for binaries and change logs | ||
| netsparkle-generate-appcast -b binary/folder -p change/log/folder -u https://example.com/downloads -p https://example.com/downloads/changelogs |
There was a problem hiding this comment.
What's the reason for this change?
There was a problem hiding this comment.
OH I'm goofy. Ok, this is a typo. The -p flag is correct, but the last -p to the URL should be -l for the change-log-url flag.
So it should read:
netsparkle-generate-appcast -b binary/folder -p change/log/folder -u https://example.com/downloads -l https://example.com/downloads/changelogs
Could you update it to that rather than removing the -p change/log/folder part, please? My bad on not understanding what you did, here.
There was a problem hiding this comment.
Fixed — the example now reads netsparkle-generate-appcast -b binary/folder -p change/log/folder -u https://example.com/downloads -l https://example.com/downloads/changelogs, exactly as you specified.
Explanation of the original change: while reworking Main/Run to return the ExitCode enum, I touched that example line and accidentally dropped the -p change/log/folder segment — and left the changelog URL on -p (change-log-path) instead of -l (change-log-url). Restored the segment and corrected the flag. Thanks for catching it! 😄
|
Thank you both for being cordial about things. 😄
EDIT: I see the typo in the example change; see comments for what needs to be tweaked. Thanks! 😅 |
The app-cast generator always exited 0, even on errors, which breaks CI usage. Main/Run now return int: all error paths (missing keys, failed generation, null signature, invalid signature, null app-cast items, parse errors) return 1, successes return 0. --help/--version still exit 0. Also fixed export-keys continuing after a null key load.