Adding support for multiple desktop files for vscode - #5
Open
tyvsmith wants to merge 3 commits into
Open
Conversation
Author
|
Any interest in merging this, so the marketplace version supports this usecase? I'd rather not maintain a fork long term. |
* Retry downloads to survive transient upstream failures Every download runs under set -e with no retry, so one bad response from an upstream aborts the whole build. This bit the VSCode Insiders build on 2026-08-08: the version endpoint answered 302 with "Location: undefined", which resolved to a 404 and killed the run. The next scheduled run passed with no change. Wrap the three wget calls in a retry helper that re-runs the whole command. wget's own --retry-on-http-error is not sufficient here: after a redirect it only re-requests the final target, so it would have re-hit the dead /sha/undefined five times and still failed. Re-running from the original URL re-rolls the redirect, which is what actually recovers this failure. --tries bounds wget's internal retries so a hard-down host cannot stretch the five attempts into a very long build. A genuinely dead URL still fails the build after the attempts are exhausted. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Propagate wget's exit status and skip the final sleep Addresses review feedback on the retry helper. The loop slept after the last attempt and logged "retrying" when it would not retry, adding 15s of dead time to every permanent failure. It also returned a bare 1, discarding wget's exit status and making failures harder to triage. Capturing the status needs the explicit else branch: an if whose condition fails with no else evaluates to 0, so reading $? after the fi returned success and let the build continue past a failed download. Verified a dead URL now propagates wget exit 4 and set -e aborts before the following command runs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR improves the AppImage build script to better support applications (e.g., VS Code / Insiders) that ship multiple .desktop files, and to make downloads more resilient to transient upstream failures.
Changes:
- Added a
retry_wgethelper and switched downloads to use it for improved resilience. - Updated desktop-file handling to copy all
app*.desktopfiles intoAppDir, rewriting names based on$APP_SHORT_NAME. - Set
APPIMAGETOOL_APP_NAME(andARCH) explicitly to reduce issues when multiple desktop files exist.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+220
to
221
| retry_wget https://github.com/AppImage/Appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage | ||
| chmod +x *.AppImage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some applications, like VSCode & VSCode Insiders generate several .desktop files. For example, one to handle URL scheme.
This has been modified to copy all app*.desktop files into the build directory.
Here's a demonstration of this working. https://github.com/tyvsmith/VSCodeInsiders-AppImage