b4nst / turbogit

Opinionated cli enforcing clean git workflow without comprising UX
https://b4nst.github.io/turbogit
MIT License
52 stars 3 forks source link

[BUG] turbogit build fails with libgit @1.4.2: git2go supports libgit2 between v1.3.0 and v1.3.0 #144

Closed barracuda156 closed 2 years ago

barracuda156 commented 2 years ago

Describe the bug

Recent libgit2 is unsupported in the base:

make: Entering directory `/opt/x86_64/var/macports/build/_opt_x86_64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_turbogit/turbogit/work/turbogit-3.1.0'
go build -trimpath -o "bin/tug" -ldflags='-s -w -X "github.com/b4nst/turbogit/cmd.BuildDate=Tue May 10 16:35:07 2022" -X "github.com/b4nst/turbogit/cmd.Commit=refs/tags/v3.1.0" -X "github.com/b4nst/turbogit/cmd.Version=3.1.0"' ./main.go 
# github.com/libgit2/git2go/v33
../.home/go/pkg/mod/github.com/libgit2/git2go/v33@v33.0.4/Build_system_dynamic.go:12:3: error: #error "Invalid libgit2 version; this git2go supports libgit2 between v1.3.0 and v1.3.0"
   12 | # error "Invalid libgit2 version; this git2go supports libgit2 between v1.3.0 and v1.3.0"
      |   ^~~~~
make: *** [bin/tug] Error 2

Also reported here: https://github.com/macports/macports-ports/pull/14602?notification_referrer_id=NT_kwDOBXwLlrMzNDYzMTg3NTU0OjkyMDE1NTEw#issuecomment-1114550734

To Reproduce

Steps

Expected behavior

Configure should allow for later versions of libgit2.

Actual behavior

Versions

macOS 10.6.8 Xcode 3.2.6 turbogit 3.1.0 libgit2 1.4.2 go 1.17.9 gcc 11.3.0

Additional context

b4nst commented 2 years ago

Fixed in v4.0.0