Skip to content

Commit 5ebdee9

Browse files
committed
build(deps): libgit2 1.3→1.5 / git2go v33→v34 (wave 4d integration)
Integrate wave 4d into versionUpgrade: git2go v34.0.0 + libgit2 1.5.0. On this branch the server Dockerfile lives as backend/Dockerfile.server (backend/Dockerfile is a symlink to Dockerfile.local). Signed-off-by: DoDiODev <DoDiDev@proton.me>
1 parent dd7b3ff commit 5ebdee9

9 files changed

Lines changed: 13 additions & 13 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ ENV DEVLAKE_PLUGINS=argocd,bamboo,bitbucket,circleci,customize,dora,gitextractor
2121

2222
RUN apt-get update -y
2323
RUN apt-get install pkg-config python3-dev default-libmysqlclient-dev build-essential libpq-dev cmake -y
24-
RUN git clone -b v1.3.0 https://github.com/libgit2/libgit2.git && cd libgit2 && mkdir build && cd build && cmake .. && make && make install
24+
RUN git clone -b v1.5.0 https://github.com/libgit2/libgit2.git && cd libgit2 && mkdir build && cd build && cmake .. && make && make install

backend/Dockerfile.local

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ RUN apt-get update && apt-get install -y \
4040

4141
# Install libgit2 for native platform only
4242
RUN mkdir -p /tmp/build && cd /tmp/build && \
43-
wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.3.0.tar.gz -O - | tar -xz && \
44-
cd libgit2-1.3.0 && \
43+
wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.5.0.tar.gz -O - | tar -xz && \
44+
cd libgit2-1.5.0 && \
4545
mkdir build && cd build && \
4646
cmake .. -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local && \
4747
make -j$(nproc) install && \

backend/Dockerfile.server

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ COPY --from=debian-arm64 /lib/aarch64-linux-gnu /rootfs-arm64/lib/aarch64-linux-
6363

6464
RUN for arch in aarch64 x86_64 ; do \
6565
mkdir -p /tmp/build/${arch} && cd /tmp/build/${arch} && \
66-
wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.3.0.tar.gz -O - | tar -xz && \
67-
cd libgit2-1.3.0 && \
66+
wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.5.0.tar.gz -O - | tar -xz && \
67+
cd libgit2-1.5.0 && \
6868
mkdir build && cd build && \
6969
if [ "$arch" = "aarch64" ] ; then \
7070
cmake .. -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \

backend/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/google/uuid v1.6.0
1515
github.com/jackc/pgx/v5 v5.10.0 // indirect
1616
github.com/lib/pq v1.12.3
17-
github.com/libgit2/git2go/v33 v33.0.9
17+
github.com/libgit2/git2go/v34 v34.0.0
1818
github.com/magiconair/properties v1.8.10
1919
github.com/mitchellh/mapstructure v1.5.0
2020
github.com/panjf2000/ants/v2 v2.12.1

backend/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
176176
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
177177
github.com/lib/pq v1.12.3 h1:tTWxr2YLKwIvK90ZXEw8GP7UFHtcbTtty8zsI+YjrfQ=
178178
github.com/lib/pq v1.12.3/go.mod h1:/p+8NSbOcwzAEI7wiMXFlgydTwcgTr3OSKMsD2BitpA=
179-
github.com/libgit2/git2go/v33 v33.0.9 h1:4ch2DJed6IhJO28BEohkUoGvxLsRzUjxljoNFJ6/O78=
180-
github.com/libgit2/git2go/v33 v33.0.9/go.mod h1:KdpqkU+6+++4oHna/MIOgx4GCQ92IPCdpVRMRI80J+4=
179+
github.com/libgit2/git2go/v34 v34.0.0 h1:UKoUaKLmiCRbOCD3PtUi2hD6hESSXzME/9OUZrGcgu8=
180+
github.com/libgit2/git2go/v34 v34.0.0/go.mod h1:blVco2jDAw6YTXkErMMqzHLcAjKkwF0aWIRHBqiJkZ0=
181181
github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE=
182182
github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
183183
github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4=

backend/plugins/gitextractor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
Please see details in the [Apache DevLake website](https://devlake.apache.org/docs/Plugins/gitextractor)
1818

1919

20-
Build with local compiled v1.3.2 libgit2
20+
Build with local compiled v1.5.0 libgit2
2121
```
2222
CGO_LDFLAGS="-L/usr/local/lib -lgit2" CGO_CFLAGS="-I/usr/local/include" go build ./plugins/gitextractor/... 2>&1 | tail -5
2323
```

backend/plugins/gitextractor/models/diffline.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717

1818
package models
1919

20-
import git "github.com/libgit2/git2go/v33"
20+
import git "github.com/libgit2/git2go/v34"
2121

2222
type DiffLines []git.DiffLine
2323

backend/plugins/gitextractor/parser/repo_libgit2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535
"github.com/apache/incubator-devlake/core/plugin"
3636
"github.com/apache/incubator-devlake/plugins/gitextractor/models"
3737

38-
git "github.com/libgit2/git2go/v33"
38+
git "github.com/libgit2/git2go/v34"
3939
)
4040

4141
var _ RepoCollector = (*Libgit2RepoCollector)(nil)

devops/docker/lake-builder/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ COPY --from=debian-amd64 /lib/x86_64-linux-gnu /rootfs-amd64/lib/x86_64-linux-gn
3232
## Build libs/headers needed for gitextractor plugin
3333
RUN \
3434
mkdir -p /tmp/build/x86_64 && cd /tmp/build/x86_64 && \
35-
wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.3.2.tar.gz -O - | tar -xz && \
36-
cd libgit2-1.3.2 && \
35+
wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.5.0.tar.gz -O - | tar -xz && \
36+
cd libgit2-1.5.0 && \
3737
mkdir build && cd build && \
3838
cmake .. -DCMAKE_C_COMPILER=x86_64-linux-gnu-gcc -DBUILD_SHARED_LIBS=ON -DCMAKE_SYSROOT=/rootfs-amd64 -DCMAKE_INSTALL_PREFIX=/usr/local/deps/x86_64 &&\
3939
make -j install &&\

0 commit comments

Comments
 (0)