Improved the "build" target in the Makefile file to make the cleaning of the docker image optional.
This commit is contained in:
parent
9465a985af
commit
01c502a4c1
5
Makefile
5
Makefile
@ -12,6 +12,7 @@ override docker?=${CLI_USE_DOCKER}
|
|||||||
override tag?=${DOCKER_IMAGE_TAG}
|
override tag?=${DOCKER_IMAGE_TAG}
|
||||||
override platform?=${DOCKER_IMAGE_PLATFORM}
|
override platform?=${DOCKER_IMAGE_PLATFORM}
|
||||||
override config?=${SWIFT_BUILD_CONFIGURATION}
|
override config?=${SWIFT_BUILD_CONFIGURATION}
|
||||||
|
override clean?=${DOCKER_IMAGE_CLEAN}
|
||||||
|
|
||||||
# --- DEPENDENCIES ---
|
# --- DEPENDENCIES ---
|
||||||
|
|
||||||
@ -32,7 +33,9 @@ ifeq ($(docker),yes)
|
|||||||
--platform ${platform} \
|
--platform ${platform} \
|
||||||
${DOCKER_IMAGE_NAME}:${tag} \
|
${DOCKER_IMAGE_NAME}:${tag} \
|
||||||
swift build --configuration ${config}
|
swift build --configuration ${config}
|
||||||
@docker rmi ${DOCKER_IMAGE_NAME}:${tag}
|
ifeq ($(clean),yes)
|
||||||
|
@docker rmi ${DOCKER_IMAGE_NAME}:${tag}
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
@swift build --configuration ${config}
|
@swift build --configuration ${config}
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user