From 15d58e82f9bddc6ea1a77cd3536cddfdc76ad48b Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 14 Jan 2025 13:18:12 -0500 Subject: [PATCH 01/10] Bump Git Credential Manager to 2.6.1 (Latest) --- dependencies.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dependencies.json b/dependencies.json index fcf0220..fdf3779 100644 --- a/dependencies.json +++ b/dependencies.json @@ -60,28 +60,28 @@ ] }, "git-credential-manager": { - "version": "2.5.0", + "version": "2.6.1", "files": [ { - "name": "gcm-linux_amd64.2.5.0.tar.gz", + "name": "gcm-linux_amd64.2.6.1.tar.gz", "platform": "linux", "arch": "amd64", - "url": "https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.5.0/gcm-linux_amd64.2.5.0.tar.gz", - "checksum": "3adb86ab82111c94a22256980efd01a064ed9a06b882b138ab631ba6996d5752" + "url": "https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.6.1/gcm-linux_amd64.2.6.1.tar.gz", + "checksum": "e01f84d3b362c3c52de6825d4e28228adb89246c9aee102b18a311f923f24115" }, { - "name": "gcm-osx-arm64-2.5.0.tar.gz", + "name": "gcm-osx-arm64-2.6.1.tar.gz", "platform": "darwin", "arch": "arm64", - "url": "https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.5.0/gcm-osx-arm64-2.5.0.tar.gz", - "checksum": "e3960aa72784ffb6e94294e1de14f0f5e96b6632854712ef4fa8837496032831" + "url": "https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.6.1/gcm-osx-arm64-2.6.1.tar.gz", + "checksum": "8e61494a6ffc1789fc5ec12ef129be84257909f315dcaf102a8f882aa32e9a2d" }, { - "name": "gcm-osx-x64-2.5.0.tar.gz", + "name": "gcm-osx-x64-2.6.1.tar.gz", "platform": "darwin", "arch": "amd64", - "url": "https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.5.0/gcm-osx-x64-2.5.0.tar.gz", - "checksum": "4c7087492310a641318d0ab79de3554ea07de599431b5ac1bd0d43efbf4fa7f7" + "url": "https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.6.1/gcm-osx-x64-2.6.1.tar.gz", + "checksum": "427be39f1d2cac60ed74f765df11a4a004c639f4353d111f122b067ee2842871" } ] } From 965635782384da512b891cbee960b08e32f0a951 Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:33:52 -0500 Subject: [PATCH 02/10] Bump lfs to 3.6.1 (latest) --- dependencies.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/dependencies.json b/dependencies.json index fdf3779..10f99ce 100644 --- a/dependencies.json +++ b/dependencies.json @@ -19,43 +19,43 @@ ] }, "git-lfs": { - "version": "v3.5.1", + "version": "v3.6.1", "files": [ { "platform": "linux", "arch": "amd64", - "name": "git-lfs-linux-amd64-v3.5.1.tar.gz", - "checksum": "6f28eb19faa7a968882dca190d92adc82493378b933958d67ceaeb9ebe4d731e" + "name": "git-lfs-linux-amd64-v3.6.1.tar.gz", + "checksum": "2138d2e405a12f1a088272e06790b76699b79cb90d0317b77aafaf35de908d76" }, { "platform": "linux", "arch": "x86", - "name": "git-lfs-linux-386-v3.5.1.tar.gz", - "checksum": "4436bbc404427b2ca24108582cb1945dd806851d8634d287b8f37fb211718bee" + "name": "git-lfs-linux-386-v3.6.1.tar.gz", + "checksum": "62dd22e2cde54c051faaf58b5432f033a0cb6bf366d00648b1bc1b9ed1e819e1" }, { "platform": "linux", "arch": "arm64", - "name": "git-lfs-linux-arm64-v3.5.1.tar.gz", - "checksum": "4f8700aacaa0fd26ae5300fb0996aed14d1fd0ce1a63eb690629c132ff5163a9" + "name": "git-lfs-linux-arm64-v3.6.1.tar.gz", + "checksum": "1c2720ff53528fbe769633d448d830aa7b682141e3c4f6a9f26b9cf3b2548d0a" }, { "platform": "linux", "arch": "arm", - "name": "git-lfs-linux-arm-v3.5.1.tar.gz", - "checksum": "03923d8badf5c382920390414ad7084c5d87b246b180474d09961e3831f552e2" + "name": "git-lfs-linux-arm-v3.6.1.tar.gz", + "checksum": "7e3e7df9d7cc663efab9d996c67af17d99afe8b0ce2fc002703cac0b8826f4f7" }, { "platform": "windows", "arch": "x86", - "name": "git-lfs-windows-386-v3.5.1.zip", - "checksum": "ea5138789c4f19ed71d30c3e407f43bd270771028d37e5292378a8ea2c154377" + "name": "git-lfs-windows-386-v3.6.1.zip", + "checksum": "74fd0d4c9ea314719b6890667b0e528c4467726e1a7302e68221afba806a69b5" }, { "platform": "windows", "arch": "amd64", - "name": "git-lfs-windows-amd64-v3.5.1.zip", - "checksum": "94435072f6b3a6f9064b277760c8340e432b5ede0db8205d369468b9be52c6b6" + "name": "git-lfs-windows-amd64-v3.6.1.zip", + "checksum": "aaca788e04f91676e58654d5ecf96cf03c76768a63b3a6918281a9678884c20c" } ] }, From df8b75970ff1e0a9acbf8499993efeed7a076d57 Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:39:30 -0500 Subject: [PATCH 03/10] Bump git to 2.45.3 and g4w 2.45.2.windows.2 --- dependencies.json | 14 +++++++------- git | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dependencies.json b/dependencies.json index 10f99ce..d80aa97 100644 --- a/dependencies.json +++ b/dependencies.json @@ -1,20 +1,20 @@ { "git": { - "version": "v2.45.1", + "version": "v2.45.3", "packages": [ { "platform": "windows", "arch": "amd64", - "filename": "MinGit-2.45.1-64-bit.zip", - "url": "https://github.com/git-for-windows/git/releases/download/v2.45.1.windows.1/MinGit-2.45.1-64-bit.zip", - "checksum": "f7ba0e2acdc603cf8893b446f6871c869b7644b88a1116b00d6b30fb30f18c74" + "filename": "MinGit-2.45.2.2-64-bit.zip", + "url": "https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.2/MinGit-2.45.2.2-64-bit.zip", + "checksum": "93ce6daa762cd82b7558162b7caee6fc60dc6e630b0b4b1a15307e7480a0c64d" }, { "platform": "windows", "arch": "x86", - "filename": "MinGit-2.45.1-32-bit.zip", - "url": "https://github.com/git-for-windows/git/releases/download/v2.45.1.windows.1/MinGit-2.45.1-32-bit.zip", - "checksum": "9c1089f13f5873190ac9473375126ba697df6773188f01ca2d6a0cf920c44287" + "filename": "MinGit-2.45.2.2-32-bit.zip", + "url": "https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.2/MinGit-2.45.2.2-32-bit.zip", + "checksum": "f1b3272a303435c89e60645e2f1460b9c6679032f6ff15b21713b7d44044dd3e" } ] }, diff --git a/git b/git index 2c7b491..fc16eb3 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit 2c7b491c1d3107be35c375f59e040b0f13d0cc0c +Subproject commit fc16eb306c2ad25c080612ae85fdeba1fbcbfc98 From fde27134c433f1edcdba8d86e358f8e05705cd1e Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:43:13 -0500 Subject: [PATCH 04/10] Update mac runner --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e98a3f..6d3e737 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,13 +25,13 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-12, windows-2019, ubuntu-20.04] + os: [macos-13, windows-2019, ubuntu-20.04] arch: [x86, x64] include: - - os: macos-12 + - os: macos-13 friendlyName: macOS targetPlatform: macOS - - os: macos-12 + - os: macos-13 friendlyName: macOS targetPlatform: macOS arch: arm64 @@ -50,7 +50,7 @@ jobs: targetPlatform: ubuntu arch: arm exclude: - - os: macos-12 + - os: macos-13 arch: x86 timeout-minutes: 20 steps: From cc0df3cebe7e0fff30f7a0ff7f9ba531792dee70 Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:53:05 -0500 Subject: [PATCH 05/10] Try bumping xcode? --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d3e737..835d165 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,11 +70,11 @@ jobs: sudo apt-get install -y nodejs # avoid "fatal: detected dubious ownership in repository at '/__w/dugite-native/dugite-native'" error git config --global --add safe.directory '*' - # We need to use Xcode 13.1 for maximum compatibility with older macOS (x64) - - name: Switch to Xcode 13.1 + # We need to use macos-14 14.1 for maximum compatibility with older macOS (x64) + - name: Switch to Xcode 14.1 if: matrix.targetPlatform == 'macOS' && matrix.arch == 'x64' run: | - sudo xcode-select -s /Applications/Xcode_13.1.app/Contents/Developer/ + sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer/ # Delete the command line tools to make sure they don't get our builds # messed up with macOS SDK 11 stuff. sudo rm -rf /Library/Developer/CommandLineTools From ef0f2a889dd38e907aecdca4662939c3d3524ace Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:59:41 -0500 Subject: [PATCH 06/10] Try specifying go --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 835d165..0667bf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,6 +86,8 @@ jobs: - name: Install go if: matrix.targetPlatform == 'macOS' uses: actions/setup-go@v5 + with: + go-version: '^1.21.13' - name: Install dependencies run: npm install - name: Check formatting From 20a3dd505eff3464f71a0c52fd7edea2eea308b1 Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:19:24 -0500 Subject: [PATCH 07/10] Match go version to lfs ci script --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0667bf4..9fcca2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,7 +87,7 @@ jobs: if: matrix.targetPlatform == 'macOS' uses: actions/setup-go@v5 with: - go-version: '^1.21.13' + go-version: '1.23.x' - name: Install dependencies run: npm install - name: Check formatting From 446474151eb8a4193ef38c46a03328a2262c7a63 Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:38:49 -0500 Subject: [PATCH 08/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fcca2a..0ef5cfc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,7 +87,7 @@ jobs: if: matrix.targetPlatform == 'macOS' uses: actions/setup-go@v5 with: - go-version: '1.23.x' + go-version: '1.22.x' - name: Install dependencies run: npm install - name: Check formatting From 4981d67487f4ccbedcd1301d3a682e7f76160faf Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 14 Jan 2025 21:57:01 +0100 Subject: [PATCH 09/10] Try bundling precompiled binaries on macOS --- dependencies.json | 12 ++++++++++++ script/build-macos.sh | 39 +++++++++++++++++++-------------------- script/update-git-lfs.ts | 2 ++ 3 files changed, 33 insertions(+), 20 deletions(-) diff --git a/dependencies.json b/dependencies.json index d80aa97..e3d695a 100644 --- a/dependencies.json +++ b/dependencies.json @@ -56,6 +56,18 @@ "arch": "amd64", "name": "git-lfs-windows-amd64-v3.6.1.zip", "checksum": "aaca788e04f91676e58654d5ecf96cf03c76768a63b3a6918281a9678884c20c" + }, + { + "platform": "darwin", + "arch": "amd64", + "name": "git-lfs-darwin-amd64-v3.6.1.zip", + "checksum": "b53c361e6c85479507ed39ba99b87ec0888ac52f5afd2084fc68af4103081391" + }, + { + "platform": "darwin", + "arch": "arm64", + "name": "git-lfs-darwin-arm64-v3.6.1.zip", + "checksum": "83b4ea3b0c72ba19e3bc46e47e92476f4505cc96693333b9fa0a314dddacc4ba" } ] }, diff --git a/script/build-macos.sh b/script/build-macos.sh index 343267d..edb0845 100755 --- a/script/build-macos.sh +++ b/script/build-macos.sh @@ -29,6 +29,9 @@ fi CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" GIT_LFS_VERSION="$(jq --raw-output '.["git-lfs"].version[1:]' dependencies.json)" +GIT_LFS_CHECKSUM="$(jq --raw-output ".\"git-lfs\".files[] | select(.arch == \"$DEPENDENCY_ARCH\" and .platform == \"darwin\") | .checksum" dependencies.json)" +GIT_LFS_FILENAME="$(jq --raw-output ".\"git-lfs\".files[] | select(.arch == \"$DEPENDENCY_ARCH\" and .platform == \"darwin\") | .name" dependencies.json)" + # shellcheck source=script/compute-checksum.sh source "$CURRENT_DIR/compute-checksum.sh" @@ -71,27 +74,23 @@ echo "-- Building git at $SOURCE to $DESTINATION" if [[ "$GIT_LFS_VERSION" ]]; then echo "-- Bundling Git LFS" - # build steps from https://github.com/git-lfs/git-lfs/wiki/Installation#source - # git tags for git-lfs are the version number prefixed with "v" - git clone -b "v$GIT_LFS_VERSION" "https://github.com/git-lfs/git-lfs" - ( - cd git-lfs - - # HACK: When cross-compiling, there seems to be an issue when git-lfs attempts - # to generate the manpage contents, and it seems that preffixing that command - # with `GOARCH=` to use the host architecture fixes the issue. - # This hack can be removed once the issue is fixed via the PR - # https://github.com/git-lfs/git-lfs/pull/4492 or some other solution. - GO_GENERATE_STRING="\$(GO) generate github.com\/git-lfs\/git-lfs\/commands" - sed -i -e "s/$GO_GENERATE_STRING/GOARCH= $GO_GENERATE_STRING/" Makefile - - make GOARCH="$GOARCH" CGO_CFLAGS="-mmacosx-version-min=$MACOSX_BUILD_VERSION" CGO_LDFLAGS="-mmacosx-version-min=$MACOSX_BUILD_VERSION" BUILTIN_LD_FLAGS="-linkmode external" - ) - GIT_LFS_BINARY_PATH="git-lfs/bin/git-lfs" - if test -f "$GIT_LFS_BINARY_PATH"; then - cp "$GIT_LFS_BINARY_PATH" "$DESTINATION/libexec/git-core/" + GIT_LFS_FILE=git-lfs.tar.gz + GIT_LFS_URL="https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/${GIT_LFS_FILENAME}" + echo "-- Downloading from $GIT_LFS_URL" + curl -sL -o $GIT_LFS_FILE "$GIT_LFS_URL" + COMPUTED_SHA256=$(compute_checksum $GIT_LFS_FILE) + if [ "$COMPUTED_SHA256" = "$GIT_LFS_CHECKSUM" ]; then + echo "Git LFS: checksums match" + SUBFOLDER="$DESTINATION/libexec/git-core" + unzip -j $GIT_LFS_FILE -d "$SUBFOLDER" "*/git-lfs" + + if [[ ! -f "$SUBFOLDER/git-lfs" ]]; then + echo "After extracting Git LFS the file was not found under libexec/git-core/" + echo "aborting..." + exit 1 + fi else - echo "The git-lfs binary is missing, the build must have failed" + echo "Git LFS: expected checksum $GIT_LFS_CHECKSUM but got $COMPUTED_SHA256" echo "aborting..." exit 1 fi diff --git a/script/update-git-lfs.ts b/script/update-git-lfs.ts index 288e686..fcfc103 100644 --- a/script/update-git-lfs.ts +++ b/script/update-git-lfs.ts @@ -93,6 +93,8 @@ async function run(): Promise { `git-lfs-linux-arm-${version}.tar.gz`, `git-lfs-windows-386-${version}.zip`, `git-lfs-windows-amd64-${version}.zip`, + `git-lfs-darwin-amd64-${version}.zip`, + `git-lfs-darwin-arm64-${version}.zip`, ] const newFiles = [] From 249d956fc18e51eed155fe43099f509097cdec6f Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 14 Jan 2025 21:59:40 +0100 Subject: [PATCH 10/10] Update build-macos.sh --- script/build-macos.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/build-macos.sh b/script/build-macos.sh index edb0845..c78645d 100755 --- a/script/build-macos.sh +++ b/script/build-macos.sh @@ -11,10 +11,12 @@ if [ "$TARGET_ARCH" = "x64" ]; then HOST_CPU=x86_64 TARGET_CFLAGS="-target x86_64-apple-darwin" GOARCH=amd64 + DEPENDENCY_ARCH="amd64" else HOST_CPU=arm64 TARGET_CFLAGS="-target arm64-apple-darwin" GOARCH=arm64 + DEPENDENCY_ARCH="arm64" fi if [[ -z "${SOURCE}" ]]; then