Skip to content

Commit

Permalink
Look for windows-arm64 binaries too 🤦
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiou87 committed Jan 21, 2025
1 parent 53a6812 commit 667ec95
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions script/embedded-git.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"url": "https://github.com/desktop/dugite-native/releases/download/v2.47.1/dugite-native-v2.47.1-8d348e6-windows-x86.tar.gz",
"checksum": "f938bc2ef0ae702479b53bb0838b5cfeea14d35c4215757e1a6df95dea52cad4"
},
"win32-arm64": {
"name": "dugite-native-v2.47.1-8d348e6-windows-arm64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.47.1/dugite-native-v2.47.1-8d348e6-windows-arm64.tar.gz",
"checksum": "4a3f4d77f3fec67b1c3235a6a82c3e259eb8eb4babd868da5a3e5d5ac309c590"
},
"darwin-x64": {
"name": "dugite-native-v2.47.1-8d348e6-macOS-x64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.47.1/dugite-native-v2.47.1-8d348e6-macOS-x64.tar.gz",
Expand Down
11 changes: 10 additions & 1 deletion script/update-embedded-git.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fetch(`https://api.github.com/repos/desktop/dugite-native/releases/latest`)
const output = {
'win32-x64': await findWindows64BitRelease(assets),
'win32-ia32': await findWindows32BitRelease(assets),
'win32-arm64': await findWindowsARM64BitRelease(assets),
'darwin-x64': await findMacOSx64BitRelease(assets),
'darwin-arm64': await findMacOSARM64BitRelease(assets),
'linux-x64': await findLinux64BitRelease(assets),
Expand Down Expand Up @@ -54,6 +55,14 @@ function findWindows32BitRelease(assets) {
return getDetailsForAsset(assets, asset)
}

function findWindowsARM64BitRelease(assets) {
const asset = assets.find(a => a.name.endsWith('-windows-arm64.tar.gz'))
if (asset == null) {
throw new Error('Could not find Windows arm64 archive in latest release')
}
return getDetailsForAsset(assets, asset)
}

function findMacOSx64BitRelease(assets) {
const asset = assets.find(a => a.name.endsWith('-macOS-x64.tar.gz'))
if (asset == null) {
Expand All @@ -65,7 +74,7 @@ function findMacOSx64BitRelease(assets) {
function findMacOSARM64BitRelease(assets) {
const asset = assets.find(a => a.name.endsWith('-macOS-arm64.tar.gz'))
if (asset == null) {
throw new Error('Could not find MacOS 64-bit archive in latest release')
throw new Error('Could not find MacOS arm64 archive in latest release')
}
return getDetailsForAsset(assets, asset)
}
Expand Down

0 comments on commit 667ec95

Please sign in to comment.