On 07/04/2025 1:31 pm, Marek Marczykowski-Górecki wrote:
> This allows rebuilding containers using podman too.
>
> Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com>
> Reviewed-by: Stefano Stabellini <sstabell...@kernel.org>
> ---
>  automation/build/Makefile           | 4 ++--
>  automation/tests-artifacts/Makefile | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/automation/build/Makefile b/automation/build/Makefile
> index 4df43b040777..fedf7524dacd 100644
> --- a/automation/build/Makefile
> +++ b/automation/build/Makefile
> @@ -31,8 +31,8 @@ clean:
>  define CLEAN_RULE
>  .PHONY: clean-$(1)
>  clean-$(1):
> -     if [ -n "$$$$(docker image ls -q $(REGISTRY)/$(subst /,:,$(1)))" ]; 
> then \
> -             docker image rm $(REGISTRY)/$(subst /,:,$(1)); \
> +     if [ -n "$$$$($(DOCKER_CMD) image ls -q $(REGISTRY)/$(subst /,:,$(1)))" 
> ]; then \
> +             $(DOCKER_CMD) image rm $(REGISTRY)/$(subst /,:,$(1)); \
>       fi
>  
>  endef
> diff --git a/automation/tests-artifacts/Makefile 
> b/automation/tests-artifacts/Makefile
> index d055cd696bed..80a60a94f3f7 100644
> --- a/automation/tests-artifacts/Makefile
> +++ b/automation/tests-artifacts/Makefile
> @@ -10,9 +10,9 @@ help:
>       @echo "To push container builds, set the env var PUSH"
>  
>  %: %.dockerfile ## Builds containers
> -     docker build --pull -t $(REGISTRY)/$(@D):$(@F) -f $< $(<D)
> +     $(DOCKER_CMD) build --pull -t $(REGISTRY)/$(@D):$(@F) -f $< $(<D)
>       @if [ ! -z $${PUSH+x} ]; then \
> -             docker push $(REGISTRY)/$(@D):$(@F); \
> +             $(DOCKER_CMD) push $(REGISTRY)/$(@D):$(@F); \
>       fi
>  
>  .PHONY: all

I'm going to apply this commit to the test artefacts repo too, as it's
got a copy of this Makefile in need of the same change.

Reply via email to