diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-07-29 09:59:05 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-07-29 09:59:05 +0300 |
commit | 1050543c235eb636f2371e918a9a3826cb70cf6e (patch) | |
tree | 719b2bcdeff1158ed4dd64e2a46f8be4810a1d15 /go.mod | |
parent | 00608758def7e556d1cb79d1eca3fbea748a0fc8 (diff) |
Makefile: Add build target for libgit2
This adds a build target for libgit2 as a prerequisite dependency for
Git2Go. The build is configured as a static archive with minimal
dependencies such that the only required shared library is the system's
libc.
Instead of building libgit2 manually, we could've also gone the way of
fetching the Git2Go repository and using its scripts. This has multiple
problems though. First, the build scripts aren't flexible and will
default to auto-detection of system-provided libraries. As a result, the
generated archive will usually have more dependencies than only libc.
Second, we'd have to use a "replace" statement for our go.mod file.
While that's not a problem by itself, it will cause several targets like
e.g. linting, verification and others to depend on the presence of this
Git2Go repository.
The approach of building libgit2 manually is thus preferable, as it
gives us both more flexibility and less dependencies on libgit2 in our
build process.
Diffstat (limited to 'go.mod')
-rw-r--r-- | go.mod | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -11,6 +11,7 @@ require ( github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/kelseyhightower/envconfig v1.3.0 github.com/lib/pq v1.2.0 + github.com/libgit2/git2go/v30 v30.0.5 github.com/olekukonko/tablewriter v0.0.2 github.com/otiai10/curr v1.0.0 // indirect github.com/prometheus/client_golang v1.0.0 |