-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support deploying arm64 builds #11683
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
03c9d77
First batch of changes to support deploying arm64 builds
sergiou87 7248295
For now only add arm64 builds for macOS to the README file
sergiou87 d56b12a
Remove unused import
sergiou87 760c893
Disable updating from x64 under Rosetta to arm64
sergiou87 9a5a509
Rename "M1 Chip" to "Apple Silicon"
sergiou87 7621c25
Fix more build issues
sergiou87 d4cde00
Use `npm_config_arch` to publish the new builds
sergiou87 dcd1848
Use the architecture as suffix instead of path for artifacts
sergiou87 ba4c0db
Fix upload of nuget packages
sergiou87 dce4e0a
Behind a feature flag, update x64 macOS users to the arm64 build when…
sergiou87 baa5fe1
Merge remote-tracking branch 'origin/development' into publish-arm64
sergiou87 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ import { parseError } from '../../lib/squirrel-error-parser' | |
import { ReleaseSummary } from '../../models/release-notes' | ||
import { generateReleaseSummary } from '../../lib/release-notes' | ||
import { setNumber, getNumber } from '../../lib/local-storage' | ||
import { enableUpdateFromRosettaToARM64 } from '../../lib/feature-flag' | ||
|
||
/** The states the auto updater can be in. */ | ||
export enum UpdateStatus { | ||
|
@@ -160,10 +161,24 @@ class UpdateStore { | |
return | ||
} | ||
|
||
let updatesURL = __UPDATES_URL__ | ||
|
||
// If the app is running under Rosetta (i.e. it's a macOS x64 binary running | ||
// on an arm64 machine), we need to tweak the update URL here to point at | ||
// the arm64 binary. | ||
if ( | ||
enableUpdateFromRosettaToARM64() && | ||
remote.app.runningUnderRosettaTranslation === true | ||
) { | ||
const url = new URL(updatesURL) | ||
url.searchParams.set('architecture', 'arm64') | ||
updatesURL = url.toString() | ||
} | ||
Comment on lines
+169
to
+176
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is needed because |
||
|
||
this.userInitiatedUpdate = !inBackground | ||
|
||
try { | ||
autoUpdater.setFeedURL({ url: __UPDATES_URL__ }) | ||
autoUpdater.setFeedURL({ url: updatesURL }) | ||
autoUpdater.checkForUpdates() | ||
} catch (e) { | ||
this.emitError(e) | ||
|
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what's used to tell our scripts about the target architecture.