Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ docker_try_rmi() {
}

sonic_get_version() {
DIRTY_SUFFIX="$(date +%Y%m%d\.%H%M%S)"
local describe=$(git describe --tags)
local latest_tag=$(git describe --tags --abbrev=0)
local branch_name=$(git rev-parse --abbrev-ref HEAD)
Expand Down
6 changes: 3 additions & 3 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SHELL = /bin/bash
USER = $(shell id -un)
UID = $(shell id -u)
GUID = $(shell id -g)
SONIC_GET_VERSION=$(shell . functions.sh && sonic_get_version)

.SECONDEXPANSION:

Expand Down Expand Up @@ -393,6 +394,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_SIMPLE_DOCKER_IMAGES)) : $(TARGET_PATH)/%.g
--build-arg uid=$(UID) \
--build-arg guid=$(GUID) \
--build-arg docker_container_name=$($*.gz_CONTAINER_NAME) \
--label Tag=$(SONIC_GET_VERSION) \
-t $* $($*.gz_PATH) $(LOG)
docker save $* | gzip -c > $@
# Clean up
Expand Down Expand Up @@ -425,6 +427,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .pl
--build-arg uid=$(UID) \
--build-arg guid=$(GUID) \
--build-arg docker_container_name=$($*.gz_CONTAINER_NAME) \
--label Tag=$(SONIC_GET_VERSION) \
-t $* $($*.gz_PATH) $(LOG)
docker save $* | gzip -c > $@
# Clean up
Expand Down Expand Up @@ -514,9 +517,6 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
chmod +x sonic_debian_extension.sh,
)

DIRTY_SUFFIX="$(shell date +%Y%m%d\.%H%M%S)"
export DIRTY_SUFFIX

USERNAME="$(USERNAME)" \
PASSWORD="$(PASSWORD)" \
./build_debian.sh $(LOG)
Expand Down