Skip to content

Commit

Permalink
Merge pull request #6 from gitkraken/bump/git-2.45.2
Browse files Browse the repository at this point in the history
bump git to 2.45.2
  • Loading branch information
zawata authored Jul 10, 2024
2 parents f540e81 + b71dbd3 commit f9eacf7
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 97 deletions.
65 changes: 15 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,53 +25,41 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-11, windows-2019, ubuntu-20.04]
arch: [x86, x64]
os: [macos-latest, windows-latest, ubuntu-20.04]
arch: [x64, arm64]
include:
- os: macos-11
- os: macos-latest
friendlyName: macOS
targetPlatform: macOS
- os: macos-11
friendlyName: macOS
targetPlatform: macOS
arch: arm64
- os: windows-2019
- os: windows-latest
friendlyName: Windows
targetPlatform: win32
- os: ubuntu-20.04
friendlyName: Linux
targetPlatform: ubuntu
- os: ubuntu-20.04
friendlyName: Linux
targetPlatform: ubuntu
arch: arm64
- os: ubuntu-20.04
friendlyName: Linux
targetPlatform: ubuntu
arch: arm
exclude:
- os: macos-11
arch: x86
- os: windows-2019
arch: x86
- os: windows-latest
arch: arm64
timeout-minutes: 20
steps:
# We need to use Xcode 11.7 for maximum compatibility with older macOS (x64)
- name: Switch to Xcode 11.7
# We need to use Xcode 14.3 for maximum compatibility with older macOS (x64)
- name: Switch to oldest available Xcode
if: matrix.targetPlatform == 'macOS' && matrix.arch == 'x64'
run: |
sudo xcode-select -s /Applications/Xcode_11.7.app/Contents/Developer/
sudo xcode-select -s /Applications/Xcode_14.3.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.
# messed up with macOS SDK stuff.
sudo rm -rf /Library/Developer/CommandLineTools
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
# Needed for script/package.sh to work
fetch-depth: 0
- name: Install go
if: matrix.targetPlatform == 'macOS'
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Install dependencies
run: npm install
- name: Check formatting
Expand All @@ -83,12 +71,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext
- name: Install extra dependencies for building Git on Ubuntu (x86)
if: matrix.targetPlatform == 'ubuntu' && matrix.arch == 'x86'
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install gcc-i686-linux-gnu binutils-i686-gnu libcurl4-gnutls-dev:i386 zlib1g-dev:i386 gettext
- name: Install extra dependencies for building Git on Ubuntu (arm64)
if: matrix.targetPlatform == 'ubuntu' && matrix.arch == 'arm64'
run: |
Expand All @@ -98,24 +80,7 @@ jobs:
sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu libcurl4-gnutls-dev:arm64 zlib1g-dev:arm64 gettext
- name: Install extra dependencies for building Git on Ubuntu (arm)
if: matrix.targetPlatform == 'ubuntu' && matrix.arch == 'arm'
run: |
sudo sed -i "s/^deb/deb [arch=amd64,i386]/g" /etc/apt/sources.list
echo "deb [arch=arm64,armhf] http://azure.ports.ubuntu.com/ $(lsb_release -s -c) main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64,armhf] http://azure.ports.ubuntu.com/ $(lsb_release -s -c)-updates main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list
sudo dpkg --add-architecture armhf
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf binutils-arm-linux-gnueabihf libcurl4-gnutls-dev:armhf zlib1g-dev:armhf gettext
- name: Build (except macOS arm64)
if: matrix.targetPlatform != 'macOS' || matrix.arch != 'arm64'
shell: bash
run: script/build.sh
env:
TARGET_PLATFORM: ${{ matrix.targetPlatform }}
TARGET_ARCH: ${{ matrix.arch }}
- name: Build (macOS arm64)
if: matrix.targetPlatform == 'macOS' && matrix.arch == 'arm64'
- name: Build
shell: bash
run: script/build.sh
env:
Expand Down
26 changes: 4 additions & 22 deletions dependencies.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"git": {
"version": "v2.44.1",
"version": "v2.45.2",
"packages": [
{
"platform": "windows",
"arch": "amd64",
"filename": "PortableGit-2.44.1-64-bit.7z.exe",
"url": "https://github.com/git-for-windows/git/releases/download/v2.44.1.windows.1/PortableGit-2.44.1-64-bit.7z.exe",
"checksum": "1300ebcd98e91df53f4a0af9bfd955450f7a362aa1e8f6126eb2aa437bf7e497"
"filename": "PortableGit-2.45.2-64-bit.7z.exe",
"url": "https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.1/PortableGit-2.45.2-64-bit.7z.exe",
"checksum": "851a15074dea6b272785b2a2a4697a72970256de2afe7b8e4a9c5e168c27ccdd"
}
]
},
Expand All @@ -20,30 +20,12 @@
"name": "git-lfs-linux-amd64-v3.5.1.tar.gz",
"checksum": "6f28eb19faa7a968882dca190d92adc82493378b933958d67ceaeb9ebe4d731e"
},
{
"platform": "linux",
"arch": "x86",
"name": "git-lfs-linux-386-v3.5.1.tar.gz",
"checksum": "4436bbc404427b2ca24108582cb1945dd806851d8634d287b8f37fb211718bee"
},
{
"platform": "linux",
"arch": "arm64",
"name": "git-lfs-linux-arm64-v3.5.1.tar.gz",
"checksum": "4f8700aacaa0fd26ae5300fb0996aed14d1fd0ce1a63eb690629c132ff5163a9"
},
{
"platform": "linux",
"arch": "arm",
"name": "git-lfs-linux-arm-v3.5.1.tar.gz",
"checksum": "03923d8badf5c382920390414ad7084c5d87b246b180474d09961e3831f552e2"
},
{
"platform": "windows",
"arch": "x86",
"name": "git-lfs-windows-386-v3.5.1.zip",
"checksum": "ea5138789c4f19ed71d30c3e407f43bd270771028d37e5292378a8ea2c154377"
},
{
"platform": "windows",
"arch": "amd64",
Expand Down
2 changes: 1 addition & 1 deletion git
Submodule git updated 521 files
16 changes: 3 additions & 13 deletions script/build-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@

set -eu -o pipefail

MACOSX_BUILD_VERSION="10.9"
MACOSX_BUILD_VERSION="10.15"
HOST_CPU=arm64

if [ "$TARGET_ARCH" = "x64" ]; then
HOST_CPU=x86_64
TARGET_CFLAGS="-target x86_64-apple-darwin"
GOARCH=amd64
else
HOST_CPU=arm64
TARGET_CFLAGS="-target arm64-apple-darwin"
GOARCH=arm64
fi
Expand Down Expand Up @@ -76,16 +75,7 @@ if [[ "$GIT_LFS_VERSION" ]]; then
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"
make GOARCH="$GOARCH" CGO_ENABLED=1 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
Expand Down
4 changes: 2 additions & 2 deletions script/generate-release-notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import * as fs from 'fs'
import { Octokit } from '@octokit/rest'

export default class GenerateReleaseNotes {
// seven targeted OS/arch combinations
// five targeted OS/arch combinations
// two files for each targeted OS/arch
// two checksum files for the previous
private SUCCESSFUL_RELEASE_FILE_COUNT = 7 * 2 * 2
private SUCCESSFUL_RELEASE_FILE_COUNT = 5 * 2 * 2
private args = process.argv.slice(2)
private expectedArgs = [
{
Expand Down
9 changes: 0 additions & 9 deletions script/update-git-lfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@ function getArch(fileName: string) {
if (fileName.match(/-amd64-/)) {
return 'amd64'
}
if (fileName.match(/-386-/)) {
return 'x86'
}
if (fileName.match(/-arm64-/)) {
return 'arm64'
}
if (fileName.match(/-arm-/)) {
return 'arm'
}

throw new Error(`Unable to find arch for file: ${fileName}`)
}
Expand Down Expand Up @@ -88,10 +82,7 @@ async function run(): Promise<boolean> {

const files = [
`git-lfs-linux-amd64-${version}.tar.gz`,
`git-lfs-linux-386-${version}.tar.gz`,
`git-lfs-linux-arm64-${version}.tar.gz`,
`git-lfs-linux-arm-${version}.tar.gz`,
`git-lfs-windows-386-${version}.zip`,
`git-lfs-windows-amd64-${version}.zip`,
]

Expand Down

0 comments on commit f9eacf7

Please sign in to comment.