1 Star 0 Fork 11

huanghaitao/git-lfs

forked from src-openEuler/git-lfs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-use-vendor-dir-for-build.patch 2.52 KB
一键复制 编辑 原始数据 按行查看 历史
gameoverboss 提交于 2020-09-20 19:15 +08:00 . init
From 2e4c2e8b73dee54dd3fa8a81325701f7295a3355 Mon Sep 17 00:00:00 2001
From: gameoverboss <gameoverboss@163.com>
Date: Wed, 21 Oct 2020 19:43:42 +0800
Subject: [PATCH] use vendor dir for build
---
Makefile | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile
index bd83e21..4d47289 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ GO_TEST_EXTRA_ARGS =
# BUILTIN_LD_FLAGS are the internal flags used to pass to the linker. By default
# the config.GitCommit variable is always set via this variable, and
# DWARF-stripping is enabled unless DWARF=YesPlease.
-BUILTIN_LD_FLAGS =
+BUILTIN_LD_FLAGS = "-linkmode=external"
ifneq ("$(VENDOR)","")
BUILTIN_LD_FLAGS += -X github.com/git-lfs/git-lfs/config.Vendor=$(VENDOR)
endif
@@ -163,8 +163,8 @@ endif
#
# It uses BUILD_MAIN as defined above to specify the entrypoint for building Git
# LFS.
-BUILD = GOOS=$(1) GOARCH=$(2) \
- $(GO) build \
+BUILD = GO111MODULE=on GOOS=$(1) GOARCH=$(2) \
+ $(GO) build -mod=vendor \
-ldflags="$(LD_FLAGS)" \
-gcflags="$(GC_FLAGS)" \
-asmflags="$(ASM_FLAGS)" \
@@ -195,7 +195,7 @@ mangen : commands/mancontent_gen.go
# 'commands' of Git LFS. It depends upon the contents of the 'docs' directory
# and converts those manpages into code.
commands/mancontent_gen.go : $(wildcard docs/man/*.ronn)
- $(GO) generate github.com/git-lfs/git-lfs/commands
+ #$(GO) generate github.com/git-lfs/git-lfs/commands
# Targets 'all' and 'build' build binaries of Git LFS for the above release
# matrix.
@@ -503,7 +503,7 @@ vendor : go.mod
.PHONY : fmt
ifeq ($(shell test -x "`which $(GOIMPORTS)`"; echo $$?),0)
fmt : $(SOURCES) | lint
- @$(GOIMPORTS) $(GOIMPORTS_EXTRA_OPTS) $?;
+ #@$(GOIMPORTS) $(GOIMPORTS_EXTRA_OPTS) $?;
else
fmt : $(SOURCES) | lint
@echo "git-lfs: skipping fmt, no goimports found at \`$(GOIMPORTS)\` ..."
@@ -513,13 +513,13 @@ endif
# are vendored in via vendor (see: above).
.PHONY : lint
lint : $(SOURCES)
- @! $(GO) list -f '{{ join .Deps "\n" }}' . \
- | $(XARGS) $(GO) list -f \
- '{{ if and (not .Standard) (not .Module) }} \
- {{ .ImportPath }} \
- {{ end }}' \
- | $(GREP) -v "github.com/git-lfs/git-lfs" \
- | $(GREP) "."
+ #@! $(GO) list -f '{{ join .Deps "\n" }}' . \
+ #| $(XARGS) $(GO) list -f \
+ # '{{ if and (not .Standard) (not .Module) }} \
+ # {{ .ImportPath }} \
+ # {{ end }}' \
+ #| $(GREP) -v "github.com/git-lfs/git-lfs" \
+ #| $(GREP) "."
# MAN_ROFF_TARGETS is a list of all ROFF-style targets in the man pages.
MAN_ROFF_TARGETS = man/git-lfs-checkout.1 \
--
2.25.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hht8/git-lfs.git
git@gitee.com:hht8/git-lfs.git
hht8
git-lfs
git-lfs
master

搜索帮助