Skip to content

Commit 0a1972b

Browse files
authored
Merge pull request #14 from gitkraken/windows-arm64
Add Windows arm64 support
2 parents fa53d6e + 45b99e7 commit 0a1972b

File tree

6 files changed

+47
-44
lines changed

6 files changed

+47
-44
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ jobs:
3939
friendlyName: Linux
4040
targetPlatform: ubuntu
4141
image: 'ubuntu:20.04'
42-
exclude:
43-
- os: windows-latest
44-
arch: arm64
4542
timeout-minutes: 20
4643
steps:
4744
- name: Install dependencies into dockerfile on Ubuntu

dependencies.json

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,49 @@
11
{
22
"git": {
3-
"version": "v2.50.1",
3+
"version": "v2.51.0",
44
"packages": [
55
{
66
"platform": "windows",
77
"arch": "amd64",
8-
"filename": "PortableGit-2.50.1-64-bit.7z.exe",
9-
"url": "https://github.com/git-for-windows/git/releases/download/v2.50.1.windows.1/PortableGit-2.50.1-64-bit.7z.exe",
10-
"checksum": "c45a7dfa2bde34059f6dbd85f49a95d73d5aea29305f51b79595e56e4f323a3d"
8+
"filename": "PortableGit-2.51.0.2-64-bit.7z.exe",
9+
"url": "https://github.com/git-for-windows/git/releases/download/v2.51.0.windows.2/PortableGit-2.51.0.2-64-bit.7z.exe",
10+
"checksum": "85d6e9f865b73827e22d532fd6cd5b93987c8d264142786b0721956619d5c00e"
11+
},
12+
{
13+
"platform": "windows",
14+
"arch": "arm64",
15+
"filename": "PortableGit-2.51.0.2-arm64.7z.exe",
16+
"url": "https://github.com/git-for-windows/git/releases/download/v2.51.0.windows.2/PortableGit-2.51.0.2-arm64.7z.exe",
17+
"checksum": "f35e795224349c63b7d6c429c2d8404a6ce7e2e8f91934a3f6ba2ca8e7e285a8"
1118
}
1219
]
1320
},
1421
"git-lfs": {
15-
"version": "v3.5.1",
22+
"version": "v3.7.0",
1623
"files": [
1724
{
1825
"platform": "linux",
1926
"arch": "amd64",
20-
"name": "git-lfs-linux-amd64-v3.5.1.tar.gz",
21-
"checksum": "6f28eb19faa7a968882dca190d92adc82493378b933958d67ceaeb9ebe4d731e"
27+
"name": "git-lfs-linux-amd64-v3.7.0.tar.gz",
28+
"checksum": "e7ebba491af8a54e560be3a00666fa97e4cf2bbbb223178a0934b8ef74cf9bed"
2229
},
2330
{
2431
"platform": "linux",
2532
"arch": "arm64",
26-
"name": "git-lfs-linux-arm64-v3.5.1.tar.gz",
27-
"checksum": "4f8700aacaa0fd26ae5300fb0996aed14d1fd0ce1a63eb690629c132ff5163a9"
33+
"name": "git-lfs-linux-arm64-v3.7.0.tar.gz",
34+
"checksum": "88c24cb0c772cb6570e70f336ef4bb7b6539c5fb9ebeda563e9a5458ca82a98e"
2835
},
2936
{
3037
"platform": "windows",
3138
"arch": "amd64",
32-
"name": "git-lfs-windows-amd64-v3.5.1.zip",
33-
"checksum": "94435072f6b3a6f9064b277760c8340e432b5ede0db8205d369468b9be52c6b6"
39+
"name": "git-lfs-windows-amd64-v3.7.0.zip",
40+
"checksum": "10be221ee5a76c6f4fc4d5b0c84d9b6f97b0db4815fb39a1b9579f04d37379ec"
41+
},
42+
{
43+
"platform": "windows",
44+
"arch": "arm64",
45+
"name": "git-lfs-windows-arm64-v3.7.0.zip",
46+
"checksum": "ec56aef19f3bcd33a239046a82b81a9844db2f66294434c5c54a470aa28ee669"
3447
}
3548
]
3649
}

git

Submodule git updated 609 files

script/build-win32.sh

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ if [[ -z "${DESTINATION}" ]]; then
1010
exit 1
1111
fi
1212

13-
if [ "$TARGET_ARCH" = "x64" ]; then
14-
DEPENDENCY_ARCH="amd64"
15-
MINGW_DIR="mingw64"
16-
else
17-
echo "Unsupported architecture"
18-
exit 1
19-
fi
13+
case "$TARGET_ARCH" in
14+
"x64")
15+
DEPENDENCY_ARCH="amd64"
16+
MINGW_DIR="mingw64";;
17+
"arm64")
18+
DEPENDENCY_ARCH="arm64"
19+
MINGW_DIR="clangarm64";;
20+
*)
21+
echo "Unsupported architecture: $TARGET_ARCH"
22+
exit 1 ;;
23+
esac
2024

2125
GIT_LFS_VERSION=$(jq --raw-output ".[\"git-lfs\"].version[1:]" dependencies.json)
2226
GIT_LFS_CHECKSUM="$(jq --raw-output ".\"git-lfs\".files[] | select(.arch == \"$DEPENDENCY_ARCH\" and .platform == \"windows\") | .checksum" dependencies.json)"
@@ -45,23 +49,6 @@ fi
4549

4650
unset COMPUTED_SHA256
4751

48-
GAWK_URL="https://mirror.msys2.org/msys/x86_64/gawk-5.3.1-1-x86_64.pkg.tar.zst"
49-
GAWK_FILENAME="gawk-5.3.1-1-x86_64.pkg.tar.zst"
50-
GAWK_CHECKSUM="9ce65f18c696723278031d05d978b0eb0cb9ee2db2d1d8c2bd5603d050b09096"
51-
52-
echo "-- Upgrading GAWK"
53-
curl -sL -o "$GAWK_FILENAME" "$GAWK_URL"
54-
COMPUTED_SHA256=$(compute_checksum "$GAWK_FILENAME")
55-
if [ "$COMPUTED_SHA256" = "$GAWK_CHECKSUM" ]; then
56-
echo "GAWK: checksums match"
57-
tar -xvf "$GAWK_FILENAME" -C "$DESTINATION" --exclude="*.BUILDINFO" --exclude="*.MTREE" --exclude="*.PKGINFO"
58-
rm "$GAWK_FILENAME"
59-
else
60-
echo "GAWK: expected checksum $GIT_FOR_WINDOWS_CHECKSUM but got $COMPUTED_SHA256"
61-
echo "aborting..."
62-
exit 1
63-
fi
64-
6552
echo "-- Deleting Unneccessary Files"
6653
cd "$DESTINATION"
6754
tr -d '\r' < "$CURRENT_DIR/windows-blacklist.txt" | xargs -d '\n' rm -rf

script/update-git-lfs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ async function run(): Promise<boolean> {
8484
`git-lfs-linux-amd64-${version}.tar.gz`,
8585
`git-lfs-linux-arm64-${version}.tar.gz`,
8686
`git-lfs-windows-amd64-${version}.zip`,
87+
`git-lfs-windows-arm64-${version}.zip`,
8788
]
8889

8990
const newFiles = []

script/update-git.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,13 @@ async function calculateAssetChecksum(uri: string) {
9696
async function getPackageDetails(
9797
assets: ReleaseAssets,
9898
body: string,
99-
arch: string
99+
arch: 'amd64' | 'arm64'
100100
) {
101-
const archValue = arch === 'amd64' ? '64-bit' : '32-bit'
101+
const archValue = {
102+
amd64: '64-bit',
103+
arm64: 'arm64',
104+
}[arch]
105+
102106
const portableGitFile = assets.find(
103107
a =>
104108
a.name.indexOf('PortableGit') !== -1 && a.name.indexOf(archValue) !== -1
@@ -210,13 +214,14 @@ async function run() {
210214
return
211215
}
212216

213-
const package64bit = await getPackageDetails(assets, body, 'amd64')
217+
const packageX64 = await getPackageDetails(assets, body, 'amd64')
218+
const packageARM64 = await getPackageDetails(assets, body, 'arm64')
214219

215-
if (package64bit == null) {
220+
if (packageX64 == null || packageARM64 == null) {
216221
return
217222
}
218223

219-
updateGitDependencies(latestGitVersion, [package64bit])
224+
updateGitDependencies(latestGitVersion, [packageX64, packageARM64])
220225

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

0 commit comments

Comments
 (0)