Skip to content

Commit

Permalink
Merge pull request #547 from desktop/releases/v2.5.1
Browse files Browse the repository at this point in the history
Releases v2.5.1
  • Loading branch information
sergiou87 authored Jul 7, 2023
2 parents af8fbc3 + 5ae9c4b commit 2671679
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dugite",
"version": "2.5.0",
"version": "2.5.1",
"description": "Elegant bindings for Git",
"main": "./build/lib/index.js",
"typings": "./build/lib/index.d.ts",
Expand Down
45 changes: 30 additions & 15 deletions script/embedded-git.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
{
"win32-x64": {
"name": "dugite-native-v2.39.3-887e871-windows-x64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3/dugite-native-v2.39.3-887e871-windows-x64.tar.gz",
"checksum": "04fccfb4ed18e72b82bf7a4d5489b97a61d07b027e44ac20a4c00ac8e5c0fac3"
"name": "dugite-native-v2.39.3-91ebaa8-windows-x64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3-1/dugite-native-v2.39.3-91ebaa8-windows-x64.tar.gz",
"checksum": "d52c40ac51637970ff8460308fe313daf27290e56a9cf92efbf2308551771660"
},
"win32-ia32": {
"name": "dugite-native-v2.39.3-887e871-windows-x86.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3/dugite-native-v2.39.3-887e871-windows-x86.tar.gz",
"checksum": "850df5220f87f97653b2fb8efc4318b7c6eb9f4a2b46b6927eb13486838066a5"
"name": "dugite-native-v2.39.3-91ebaa8-windows-x86.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3-1/dugite-native-v2.39.3-91ebaa8-windows-x86.tar.gz",
"checksum": "ec9d8c575e1c178c89093c391325b3b291f743f7530ffb9f023c3dd4dcc2d155"
},
"darwin-x64": {
"name": "dugite-native-v2.39.3-887e871-macOS-x64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3/dugite-native-v2.39.3-887e871-macOS-x64.tar.gz",
"checksum": "7074046490e0788eafd647d79ea1118fd14632ef6008bbbb1183ec6952e18198"
"name": "dugite-native-v2.39.3-91ebaa8-macOS-x64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3-1/dugite-native-v2.39.3-91ebaa8-macOS-x64.tar.gz",
"checksum": "84bcd256345a24ca087632aeb9a14989858f211883646bbd637dde56913a5017"
},
"darwin-arm64": {
"name": "dugite-native-v2.39.3-887e871-macOS-arm64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3/dugite-native-v2.39.3-887e871-macOS-arm64.tar.gz",
"checksum": "9c043ae08a739b195a517952dfd53be6fa56c7db26dcb6cab0931f0a7c905b9b"
"name": "dugite-native-v2.39.3-91ebaa8-macOS-arm64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3-1/dugite-native-v2.39.3-91ebaa8-macOS-arm64.tar.gz",
"checksum": "37467de076043b59d9af274fdef9c2a4e00f0c9112ba9e2b839eae90ea8a9628"
},
"linux-x64": {
"name": "dugite-native-v2.39.3-887e871-ubuntu.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3/dugite-native-v2.39.3-887e871-ubuntu.tar.gz",
"checksum": "7a6c87e0010896c6580a09a973a3ba895ebbac4f980fbf57502615954e3cd24f"
"name": "dugite-native-v2.39.3-91ebaa8-ubuntu-x64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3-1/dugite-native-v2.39.3-91ebaa8-ubuntu-x64.tar.gz",
"checksum": "78375b97c802caa33c4ab585e3cf113001f0f53d0ab623ef0086e7c5b819189d"
},
"linux-x86": {
"name": "dugite-native-v2.39.3-91ebaa8-ubuntu-x86.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3-1/dugite-native-v2.39.3-91ebaa8-ubuntu-x86.tar.gz",
"checksum": "1cd3511fc8a51556bdc88393cd344e0c084e7063c281137644765929ee092e8d"
},
"linux-arm": {
"name": "dugite-native-v2.39.3-91ebaa8-ubuntu-arm.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3-1/dugite-native-v2.39.3-91ebaa8-ubuntu-arm.tar.gz",
"checksum": "331727414dc0d559758982f62adc9823c01e51ff302b5e5fe9e0cd783e5e1ea5"
},
"linux-arm64": {
"name": "dugite-native-v2.39.3-91ebaa8-ubuntu-arm64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.39.3-1/dugite-native-v2.39.3-91ebaa8-ubuntu-arm64.tar.gz",
"checksum": "8af507edf110a285b72e7bc884aa2a3cc2ca09b687f0ea1366d7806c488b7bb6"
}
}
31 changes: 29 additions & 2 deletions script/update-embedded-git.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ get(`https://api.github.com/repos/desktop/dugite-native/releases/latest`).then(
'win32-ia32': await findWindows32BitRelease(assets),
'darwin-x64': await findMacOSx64BitRelease(assets),
'darwin-arm64': await findMacOSARM64BitRelease(assets),
'linux-x64': await findLinux64BitRelease(assets)
'linux-x64': await findLinux64BitRelease(assets),
'linux-x86': await findLinux32BitRelease(assets),
'linux-arm': await findLinuxARM32BitRelease(assets),
'linux-arm64': await findLinuxARM64BitRelease(assets)
}

const fileContents = JSON.stringify(output, null, 2)
Expand Down Expand Up @@ -67,13 +70,37 @@ function findMacOSARM64BitRelease(assets) {
}

function findLinux64BitRelease(assets) {
const asset = assets.find(a => a.name.endsWith('-ubuntu.tar.gz'))
const asset = assets.find(a => a.name.endsWith('-ubuntu-x64.tar.gz'))
if (asset == null) {
throw new Error('Could not find Linux 64-bit archive in latest release')
}
return getDetailsForAsset(assets, asset)
}

function findLinux32BitRelease(assets) {
const asset = assets.find(a => a.name.endsWith('-ubuntu-x86.tar.gz'))
if (asset == null) {
throw new Error('Could not find Linux 32-bit archive in latest release')
}
return getDetailsForAsset(assets, asset)
}

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

function findLinuxARM32BitRelease(assets) {
const asset = assets.find(a => a.name.endsWith('-ubuntu-arm.tar.gz'))
if (asset == null) {
throw new Error('Could not find Linux 32-bit archive in latest release')
}
return getDetailsForAsset(assets, asset)
}

async function getDetailsForAsset(assets, currentAsset) {
const { name } = currentAsset
const url = currentAsset.browser_download_url
Expand Down

0 comments on commit 2671679

Please sign in to comment.