Skip to content

Commit

Permalink
fix(git2go): Remove references to git2go from build
Browse files Browse the repository at this point in the history
Signed-off-by: Cezar Craciunoiu <[email protected]>
  • Loading branch information
craciunoiuc committed May 17, 2023
1 parent 419dbcf commit 26bceeb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 42 deletions.
10 changes: 0 additions & 10 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,18 @@ builds:
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath #removes all file system paths from the compiled executable
tags:
- static
- system_libgit2
ldflags:
- '-s -w -X {{ .ModulePath }}/version.Version={{.Version}} -X {{ .ModulePath }}/version.VersionPrerelease= '
goos:
- linux
goarch:
- amd64
binary: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
hooks:
pre: make git2go
-
id: linux-builds
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
tags:
- static
- system_libgit2
ldflags:
- '-s -w -X {{ .ModulePath }}/version.Version={{.Version}} -X {{ .ModulePath }}/version.VersionPrerelease= '
goos:
Expand All @@ -49,8 +41,6 @@ builds:
- goos: linux
goarch: amd64
binary: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
hooks:
pre: make git2go
archives:
- format: zip
files:
Expand Down
33 changes: 2 additions & 31 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ GO_VERSION ?= 1.20

.PHONY: dev

build: git2go
@go build -tags static -buildvcs=false -o ${BINARY}
build:
@go build -buildvcs=false -o ${BINARY}

dev: build
@mkdir -p ~/.packer.d/plugins/
Expand All @@ -37,32 +37,3 @@ testacc: dev

generate: install-packer-sdc
@go generate ./...

.PHONY: git2go
git2go: $(VENDORDIR)/libgit2/git2go/static-build/install/lib/pkgconfig/libgit2.pc
@go install -tags static github.com/libgit2/git2go/v31/...

$(VENDORDIR)/libgit2/git2go/static-build/install/lib/pkgconfig/libgit2.pc: $(VENDORDIR)/libgit2/git2go/vendor/libgit2
@mkdir -p $(VENDORDIR)/libgit2/git2go/static-build/build
@mkdir -p $(VENDORDIR)/libgit2/git2go/static-build/install
(cd $(VENDORDIR)/libgit2/git2go/static-build/build && $(CMAKE) \
-DTHREADSAFE=ON \
-DBUILD_CLAR=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DREGEX_BACKEND=builtin \
-DUSE_BUNDLED_ZLIB=ON \
-DUSE_HTTPS=ON \
-DUSE_SSH=ON \
-DCMAKE_C_FLAGS=-fPIC \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_INSTALL_PREFIX=$(VENDORDIR)/libgit2/git2go/static-build/install \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DDEPRECATE_HARD="${BUILD_DEPRECATE_HARD}" \
$(VENDORDIR)/libgit2/git2go/vendor/libgit2)
$(MAKE) -C $(VENDORDIR)/libgit2/git2go/static-build/build install

$(VENDORDIR)/libgit2/git2go/vendor/libgit2: $(VENDORDIR)/libgit2/git2go
@git -C $(VENDORDIR)/libgit2/git2go submodule update --init --recursive

$(VENDORDIR)/libgit2/git2go:
@git clone --branch v31.7.9 --recurse-submodules https://github.com/libgit2/git2go.git $@
1 change: 0 additions & 1 deletion third_party/libgit2/git2go
Submodule git2go deleted from cbca5b

0 comments on commit 26bceeb

Please sign in to comment.