File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ DOCDIR ?= $(DATADIR)/doc
39
39
40
40
BINARY ?= "nerdctl"
41
41
MAKEFILE_DIR := $(patsubst % /,% ,$(dir $(abspath $(lastword $(MAKEFILE_LIST ) ) ) ) )
42
- VERSION ?= $(shell git -C $(MAKEFILE_DIR ) describe --match 'v[0-9]* ' --dirty='.m' --always --tags)
42
+ VERSION ?= $(shell git -C $(MAKEFILE_DIR ) describe --match 'v[0-9]* ' --dirty='.m' --always --tags 2>/dev/null || echo no_git_information )
43
43
VERSION_TRIMMED := $(VERSION:v%=% )
44
- REVISION ?= $(shell git -C $(MAKEFILE_DIR ) rev-parse HEAD)$(shell if ! git -C $(MAKEFILE_DIR ) diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
44
+ REVISION ?= $(shell git -C $(MAKEFILE_DIR ) rev-parse HEAD 2>/dev/null || echo no_git_information )$(shell if ! git -C $(MAKEFILE_DIR ) diff --no-ext-diff --quiet --exit-code 2>/dev/null ; then echo .m; fi)
45
45
LINT_COMMIT_RANGE ?= main..HEAD
46
46
GO_BUILD_LDFLAGS ?= -s -w
47
47
GO_BUILD_FLAGS ?=
You can’t perform that action at this time.
0 commit comments