diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index a116ad4..0000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -**/** -!hack/ diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c266cc9..c2b7d63 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,8 +23,9 @@ jobs: - 5000:5000 steps: - name: Checkout - id: checkout uses: actions/checkout@v2 + - name: Unshallow + run: git fetch --prune --unshallow - name: Set up QEMU id: qemu uses: docker/setup-qemu-action@v1 @@ -54,6 +55,7 @@ jobs: key: ${{ runner.os }}-buildx-ghcache-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx-ghcache- + - run: cat ./hack/Makefile - name: Build candidate image id: build_candidate uses: docker/build-push-action@v2 diff --git a/Dockerfile b/Dockerfile index ae5b0f9..42f068d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ FROM scratch -COPY hack/Makefile Makefile +COPY ./hack/Makefile Makefile diff --git a/Dockerfile.test b/Dockerfile.test index 2930eab..0c3c239 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -1,6 +1,6 @@ # This Dockerfile tests the hack/Makefile output against git2go. ARG BASE_VARIANT=bullseye -ARG GO_VERSION=1.16.8 +ARG GO_VERSION=1.17.5 ARG XX_VERSION=1.0.0-rc.2 FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx @@ -12,7 +12,7 @@ FROM gostable AS go-linux FROM go-${TARGETOS} AS build-base-bullseye COPY --from=xx / / -COPY hack/Makefile /libgit2/Makefile +COPY ./hack/Makefile /libgit2/Makefile RUN make -C /libgit2/ cmake diff --git a/Makefile b/Makefile index 8933ba9..7ed4e3f 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ STATIC_TEST_TAG := test PLATFORMS ?= linux/amd64,linux/arm/v7,linux/arm64 BUILD_ARGS ?= -GIT2GO_TAG ?= v33.0.1 +GIT2GO_TAG ?= v31.6.1 .PHONY: build build: diff --git a/hack/Makefile b/hack/Makefile index 79a70f6..18cabeb 100644 --- a/hack/Makefile +++ b/hack/Makefile @@ -15,8 +15,8 @@ INSTALL_LIBDIR ?= $(INSTALL_PREFIX)/lib/$(shell xx-info triple) endif BUILD_TYPE ?= "RelWithDebInfo" FLAGS ?= -USE_HTTPS ?= OFF -USE_SSH ?= OFF +USE_HTTPS ?= OpenSSL +USE_SSH ?= ON USE_BUNDLED_ZLIB ?= OFF BUILD_SHARED_LIBS ?= ON @@ -24,7 +24,7 @@ BUILD_SHARED_LIBS ?= ON CMAKE_VERSION ?= 3.21.3 # Libgit2 version to be compiled and installed. -LIBGIT2_VERSION ?= 1.3.0 +LIBGIT2_VERSION ?= 1.1.1 # In some scenarios libgit2 needs to be checked out to a specific commit. # This takes presidence over LIBGIT_VERSION if defined. # Ref: https://github.com/libgit2/git2go/issues/834 @@ -127,7 +127,7 @@ $(LIBGIT2): -DBUILD_CLAR:BOOL:BOOL=OFF \ -DTHREADSAFE:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=$(BUILD_SHARED_LIBS) \ - -DUSE_BUNDLED_ZLIB:BOOL=OFF \ + -DUSE_BUNDLED_ZLIB:BOOL=$(USE_BUNDLED_ZLIB) \ -DUSE_HTTP_PARSER:STRING=builtin \ -DREGEX_BACKEND:STRING=builtin \ -DUSE_HTTPS:STRING=$(USE_HTTPS) \