Clean up Linux DEB filename for AppsCDN uploads#3501
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Cleans up the Linux DEB filename uploaded to AppsCDN. Previously, electron-installer-debian produced filenames already containing arch+version, then create_versioned_file appended its own -<arch>-v<version> suffix, producing duplicated/mangled names like studio_1.9.0dev51_amd64-x64-v1.9.0-dev51.deb. This PR renames the DEB to a clean studio.deb stem before returning the path so the final uploaded filename matches the Mac convention (studio-x64-v<version>.deb).
Changes:
- Rename the resolved Linux DEB to
studio.debinlinux_deb_pathsocreate_versioned_fileproduces a clean Mac-style suffix. - Make the rename idempotent by short-circuiting when
studio.debalready exists (for retries). - Update the surrounding comment to explain the new behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Related issues
Follow-up to #3464 (Linux dev build distribution).
How AI was used in this PR
AI-assisted: spotted the duplicated arch/version in the uploaded filename while verifying the first trunk Distribute Dev Builds run, drafted the fix and PR body. Author reviewed.
Proposed Changes
The Linux DEBs uploaded to AppsCDN by build #16245 landed with names like:
studio_1.9.0dev51_amd64-x64-v1.9.0-dev51.debstudio_1.9.0dev51_arm64-arm64-v1.9.0-dev51.debBoth arch (
amd64+x64) and version (1.9.0dev51+v1.9.0-dev51) appear twice. The cause:electron-installer-debianproduces filenames likestudio_1.9.0~dev51_amd64.deb, thencreate_versioned_file(in this Fastfile) blindly appends-<arch>-v<version>to the base name. For Mac the input is a cleanStudio.app.zip, so the result isstudio-x64-v1.9.0.zip; for Linux the input already carries arch+version, so the suffix is duplicated. WordPress's media library then strips the~, mashing the version slug.This change renames the Linux DEB to a clean
studio.debstem inlinux_deb_pathbefore returning the path.create_versioned_filethen produces the Mac-stylestudio-<arch>-v<version>.deb(e.g.studio-x64-v1.9.0-dev51.deb). The rename is idempotent — retries pick up the already-renamed file.Why this is cosmetic-only:
studio-app/updatesendpoint, which compares theversionfield in upload metadata (passed explicitly toupload_file_to_apps_cdn), not the filename.apt/dpkginstall behavior reads the DEB's internal control file, not the filename.media_urlis composed fromplatform/version/build_number, not the filename — onlyContent-Dispositionafter the 302 changes.User-visible impact: the filename users see in their Downloads folder after clicking the in-app update button (#3465) becomes readable.
Testing Instructions
cdn-linkannotation on the Distribute Dev Builds job.studio-x64-v<version>.deb/studio-arm64-v<version>.deb.Pre-merge Checklist