From 2919eebf31064dae03acf992153116e09c5dbbe1 Mon Sep 17 00:00:00 2001 From: lhchavez Date: Sat, 4 Sep 2021 20:07:24 -0700 Subject: [PATCH] Declare forward-compatibility with libgit2 v1.2.0 #minor (#800) We can't yet ship a fully libgit2 v1.2.0-compatible library due to a missing public symbol, but we can allow the v1.1.0-era codebase to link against libgit2 v1.2.0 in the meantime. (cherry picked from commit 549706bb573653469fbcc35c839759987c318d0c) --- .github/workflows/ci.yml | 7 +++++-- Build_bundled_static.go | 4 ++-- Build_system_dynamic.go | 4 ++-- Build_system_static.go | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 316c451..3c494c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,10 @@ jobs: strategy: fail-fast: false matrix: - libgit2: [ '1.0.0', '1.1.0' ] + libgit2: + - 'v1.0.0' + - 'v1.1.0' + - 'v1.2.0' name: Go (system-wide, dynamic) runs-on: ubuntu-20.04 @@ -78,7 +81,7 @@ jobs: run: | git submodule update --init sudo apt-get install -y --no-install-recommends libssh2-1-dev - sudo env BUILD_LIBGIT_REF=v${{ matrix.libgit2 }} ./script/build-libgit2.sh --dynamic --system + sudo env BUILD_LIBGIT_REF=${{ matrix.libgit2 }} ./script/build-libgit2.sh --dynamic --system - name: Test run: make TEST_ARGS=-test.v test diff --git a/Build_bundled_static.go b/Build_bundled_static.go index f467c5c..4c9233e 100644 --- a/Build_bundled_static.go +++ b/Build_bundled_static.go @@ -9,8 +9,8 @@ package git #cgo CFLAGS: -DLIBGIT2_STATIC #include -#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 0 || LIBGIT2_VER_MINOR > 1 -# error "Invalid libgit2 version; this git2go supports libgit2 between v1.0.0 and v1.1.0". +#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 0 || LIBGIT2_VER_MINOR > 2 +# error "Invalid libgit2 version; this git2go supports libgit2 between v1.0.0 and v1.2.0". #endif */ import "C" diff --git a/Build_system_dynamic.go b/Build_system_dynamic.go index 495fbf5..81dd217 100644 --- a/Build_system_dynamic.go +++ b/Build_system_dynamic.go @@ -7,8 +7,8 @@ package git #cgo CFLAGS: -DLIBGIT2_DYNAMIC #include -#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 0 || LIBGIT2_VER_MINOR > 1 -# error "Invalid libgit2 version; this git2go supports libgit2 between v1.0.0 and v1.1.0". +#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 0 || LIBGIT2_VER_MINOR > 2 +# error "Invalid libgit2 version; this git2go supports libgit2 between v1.0.0 and v1.2.0". #endif */ import "C" diff --git a/Build_system_static.go b/Build_system_static.go index b016689..a3e528c 100644 --- a/Build_system_static.go +++ b/Build_system_static.go @@ -7,8 +7,8 @@ package git #cgo CFLAGS: -DLIBGIT2_STATIC #include -#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 0 || LIBGIT2_VER_MINOR > 1 -# error "Invalid libgit2 version; this git2go supports libgit2 between v1.0.0 and v1.1.0". +#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 0 || LIBGIT2_VER_MINOR > 2 +# error "Invalid libgit2 version; this git2go supports libgit2 between v1.0.0 and v1.2.0". #endif */ import "C" -- 2.45.2