File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ DOCKER_BUILD = docker build --no-cache \
38
38
-f slave.mk \
39
39
PLATFORM=$(PLATFORM ) \
40
40
BUILD_NUMBER=$(BUILD_NUMBER ) \
41
+ ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE ) \
41
42
$@
42
43
43
44
sonic-slave-build :
Original file line number Diff line number Diff line change @@ -53,11 +53,14 @@ docker_try_rmi() {
53
53
sonic_get_version () {
54
54
local describe=$( git describe --tags)
55
55
local latest_tag=$( git describe --tags --abbrev=0)
56
- BUILD_NUMBER=${BUILD_NUMBER:- dev}
57
- # # Cehck if we are on tagged commit
56
+ if [ -n " $( git status --untracked-files=no -s --ignore-submodules) " ]; then
57
+ local dirty=" -dirty"
58
+ fi
59
+ BUILD_NUMBER=${BUILD_NUMBER:- 0}
60
+ # # Check if we are on tagged commit
58
61
if [ " $describe " == " $latest_tag " ]; then
59
- echo " $latest_tag "
62
+ echo " ${ latest_tag}${dirty} "
60
63
else
61
- echo " ${latest_tag} .${BUILD_NUMBER} - $( git rev-parse --short HEAD) "
64
+ echo " ${latest_tag} .${BUILD_NUMBER}${dirty :- - $(git rev-parse --short HEAD)} "
62
65
fi
63
66
}
You can’t perform that action at this time.
0 commit comments