Skip to content

Commit c4dfeb4

Browse files
committed
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: git-for-windows/git#3107 (comment) Signed-off-by: Dennis Ameling <[email protected]> Signed-off-by: Dennis Ameling <[email protected]>
1 parent da7def2 commit c4dfeb4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

script/update-git.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,13 @@ async function getLatestStableRelease() {
7474
async function getPackageDetails(
7575
assets: ReleaseAssets,
7676
body: string,
77-
arch: string
77+
arch: 'amd64' | 'x86' | 'arm64'
7878
) {
79-
const archValue = arch === 'amd64' ? '64-bit' : '32-bit'
79+
const archValue = {
80+
amd64: '64-bit',
81+
x86: '32-bit',
82+
arm64: 'arm64',
83+
}[arch]
8084

8185
const minGitFile = assets.find(
8286
a => a.name.indexOf('MinGit') !== -1 && a.name.indexOf(archValue) !== -1
@@ -181,12 +185,13 @@ async function run() {
181185

182186
const package64bit = await getPackageDetails(assets, body, 'amd64')
183187
const package32bit = await getPackageDetails(assets, body, 'x86')
188+
const packagearm64 = await getPackageDetails(assets, body, 'arm64')
184189

185-
if (package64bit == null || package32bit == null) {
190+
if (package64bit == null || package32bit == null || packagearm64 == null) {
186191
return
187192
}
188193

189-
updateGitDependencies(latestGitVersion, [package64bit, package32bit])
194+
updateGitDependencies(latestGitVersion, [package64bit, package32bit, packagearm64])
190195

191196
console.log(
192197
`✅ Updated dependencies metadata to Git ${latestGitVersion} (Git for Windows ${version})`

0 commit comments

Comments
 (0)