Skip to content

Add fetch_devedition function to generate.nu#62

Open
LucasOe wants to merge 2 commits intonix-community:masterfrom
LucasOe:master
Open

Add fetch_devedition function to generate.nu#62
LucasOe wants to merge 2 commits intonix-community:masterfrom
LucasOe:master

Conversation

@LucasOe
Copy link

@LucasOe LucasOe commented Jan 29, 2026

This pull request updates how the "devedition" (Developer Edition) Firefox builds are fetched and referenced. The main change is that "devedition" is now retrieved from its correct upstream location, which is separate from the standard Firefox releases. This ensures the correct URLs and hashes are used for these builds.

Fixes #61

Copilot AI review requested due to automatic review settings January 29, 2026 15:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR separates the Firefox Developer Edition downloads to use the correct Mozilla CDN path (pub/devedition/releases/ instead of pub/firefox/releases/), which is the proper source for Developer Edition binaries.

Changes:

  • Added a new fetch_devedition function to generate.nu that fetches from the Developer Edition CDN path
  • Updated the call site to use fetch_devedition instead of fetch_release for Developer Edition
  • Regenerated latest.json with the correct URLs and hashes for Developer Edition binaries

Reviewed changes

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

File Description
generate.nu Added fetch_devedition function and updated the call site to use it for Developer Edition
latest.json Updated Developer Edition URLs to use pub/devedition/releases/ path and regenerated hashes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +32 to +54
def fetch_devedition (version: string, system: string, extension: string) {
let base = $"https://download.cdn.mozilla.net/pub/devedition/releases/($version)"

let filename = $"($system)/en-US/firefox-($version).($extension)"

let row = (
http get $"($base)/SHA512SUMS"
| from ssv -m 1 --noheaders
| where column1 == $filename
)

if ($row | is-not-empty) {
let hash = $row.column0.0

return {
version: $version,
url: $"($base)/($filename)",
hash: (to_sri $hash)
}
} else {
return null
}
}
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fetch_devedition function is nearly identical to fetch_release (lines 8-30), with only the base URL differing. Consider refactoring to reduce code duplication by adding a parameter to control the URL path segment, or by extracting the common logic into a shared helper function. This would make the code more maintainable and reduce the risk of bugs when updating one function but forgetting to update the other.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The duplication is intentional for now: separate functions are meant to make the semantic distinction between the different channels explicit at the call site, rather than encoding that distinction via a parameter.

I'm open to revisiting this if requested by @colemickens.

@LucasOe LucasOe changed the title Add fetch_devedition function Add fetch_devedition function to generate.nu Jan 29, 2026
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.

firefox-devedition-bin input resolves to Beta instead of Developer Edition

2 participants