diff --git a/.goreleaser.yml b/.goreleaser.yml index 5e06794..6e152ba 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -19,9 +19,6 @@ 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: @@ -29,16 +26,11 @@ builds: 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: @@ -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: diff --git a/GNUmakefile b/GNUmakefile index dc4603c..6743ff3 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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/ @@ -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 $@ diff --git a/third_party/libgit2/git2go b/third_party/libgit2/git2go deleted file mode 160000 index cbca5b8..0000000 --- a/third_party/libgit2/git2go +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cbca5b82b8c22c08c183a1f44cad4b8b51ba6f25