From e9822f9da87f1f824d2c9f805fcddcdbd4d76d2b Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Tue, 26 Nov 2024 14:52:26 +0100 Subject: [PATCH] update-git: support arm64 Git for Windows added support for arm64 releases in their 2.47.1 version. Let's add support for it in the `update-git.ts` script. Ref: https://github.com/git-for-windows/git/releases/tag/v2.47.1.windows.1 Ref: https://github.com/git-for-windows/git/issues/3107#issuecomment-2498275856 Signed-off-by: Dennis Ameling --- git | 2 +- script/update-git.ts | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/git b/git index 2c7b491..92999a4 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit 2c7b491c1d3107be35c375f59e040b0f13d0cc0c +Subproject commit 92999a42db1c5f43f330e4f2bca4026b5b81576f diff --git a/script/update-git.ts b/script/update-git.ts index bda147c..47eec18 100644 --- a/script/update-git.ts +++ b/script/update-git.ts @@ -74,9 +74,13 @@ async function getLatestStableRelease() { async function getPackageDetails( assets: ReleaseAssets, body: string, - arch: string + arch: 'amd64' | 'x86' | 'arm64' ) { - const archValue = arch === 'amd64' ? '64-bit' : '32-bit' + const archValue = { + amd64: '64-bit', + x86: '32-bit', + arm64: 'arm64', + }[arch] const minGitFile = assets.find( a => a.name.indexOf('MinGit') !== -1 && a.name.indexOf(archValue) !== -1 @@ -181,12 +185,17 @@ async function run() { const package64bit = await getPackageDetails(assets, body, 'amd64') const package32bit = await getPackageDetails(assets, body, 'x86') + const packagearm64 = await getPackageDetails(assets, body, 'arm64') - if (package64bit == null || package32bit == null) { + if (package64bit == null || package32bit == null || packagearm64 == null) { return } - updateGitDependencies(latestGitVersion, [package64bit, package32bit]) + updateGitDependencies(latestGitVersion, [ + package64bit, + package32bit, + packagearm64, + ]) console.log( `✅ Updated dependencies metadata to Git ${latestGitVersion} (Git for Windows ${version})`