[build] Fix unexpected warnings: No names found, cannot describe anything. (#12963)
Why I did it In PR check pipelines, there are too many duplicated warnings: fatal: No names found, cannot describe anything. SONIC_IMAGE_VERSION will not change in one build. We don't need to calculate in every reference. We just need calculate one time, then record it. In Makefile, '=' will calculate again and again when it is referred. How I did it Fix it in Makefile. How to verify it Check this PR's check pipeline result.
This commit is contained in:
parent
8d0419567b
commit
25d9ebbaf4
2
slave.mk
2
slave.mk
@ -11,7 +11,7 @@ UID = $(shell id -u)
|
||||
GUID = $(shell id -g)
|
||||
|
||||
ifeq ($(SONIC_IMAGE_VERSION),)
|
||||
override SONIC_IMAGE_VERSION = $(shell export BUILD_TIMESTAMP=$(BUILD_TIMESTAMP) && export BUILD_NUMBER=$(BUILD_NUMBER) && . functions.sh && sonic_get_version)
|
||||
override SONIC_IMAGE_VERSION := $(shell export BUILD_TIMESTAMP=$(BUILD_TIMESTAMP) && export BUILD_NUMBER=$(BUILD_NUMBER) && . functions.sh && sonic_get_version)
|
||||
endif
|
||||
|
||||
.SECONDEXPANSION:
|
||||
|
Loading…
Reference in New Issue
Block a user