Skip to content

Commit

Permalink
[build] Fix unexpected warnings: No names found, cannot describe anyt…
Browse files Browse the repository at this point in the history
…hing. (sonic-net#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.
  • Loading branch information
liushilongbuaa authored and mssonicbld committed Dec 21, 2022
1 parent 025a845 commit 7758f8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7758f8e

Please sign in to comment.