mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Update git commit command
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
503ed96275
commit
3168718563
3
Makefile
3
Makefile
@ -51,6 +51,7 @@ CLI_VERSION = $(LIB_VERSION)$(if $(LIB_TAG),-$(LIB_TAG))
|
|||||||
else
|
else
|
||||||
CLI_VERSION = $(VERSION)
|
CLI_VERSION = $(VERSION)
|
||||||
endif
|
endif
|
||||||
|
CLI_VERSION_PACKAGE = github.com/NVIDIA/nvidia-container-toolkit/internal/info
|
||||||
|
|
||||||
GOOS ?= linux
|
GOOS ?= linux
|
||||||
|
|
||||||
@ -60,7 +61,7 @@ cmd-%: COMMAND_BUILD_OPTIONS = -o $(PREFIX)/$(*)
|
|||||||
endif
|
endif
|
||||||
cmds: $(CMD_TARGETS)
|
cmds: $(CMD_TARGETS)
|
||||||
$(CMD_TARGETS): cmd-%:
|
$(CMD_TARGETS): cmd-%:
|
||||||
GOOS=$(GOOS) go build -ldflags "-s -w -X github.com/NVIDIA/nvidia-container-toolkit/internal/info.gitCommit=$(GIT_COMMIT) -X github.com/NVIDIA/nvidia-container-toolkit/internal/info.version=$(CLI_VERSION)" $(COMMAND_BUILD_OPTIONS) $(MODULE)/cmd/$(*)
|
GOOS=$(GOOS) go build -ldflags "-s -w -X $(CLI_VERSION_PACKAGE).gitCommit=$(GIT_COMMIT) -X $(CLI_VERSION_PACKAGE).version=$(CLI_VERSION)" $(COMMAND_BUILD_OPTIONS) $(MODULE)/cmd/$(*)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
GOOS=$(GOOS) go build ./...
|
GOOS=$(GOOS) go build ./...
|
||||||
|
@ -27,4 +27,4 @@ LIBNVIDIA_CONTAINER0_VERSION := 0.10.0+jetpack
|
|||||||
CUDA_VERSION := 11.7.1
|
CUDA_VERSION := 11.7.1
|
||||||
GOLANG_VERSION := 1.17.8
|
GOLANG_VERSION := 1.17.8
|
||||||
|
|
||||||
GIT_COMMIT ?= $(shell git describe --dirty --long --always 2> /dev/null || echo "")
|
GIT_COMMIT ?= $(shell git describe --match="" --dirty --long --always 2> /dev/null || echo "")
|
||||||
|
Loading…
Reference in New Issue
Block a user