diff --git a/Makefile b/Makefile index acd1f4d5..e8424030 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ DOCKER_COMPOSE_FILE=_tests/integration/local_docker_test_environment/docker-compose.yml SRC_DIR_IN_GOPATH=/bitrise/src +DOCKERCOMPOSE=$(shell which docker-compose 2> /dev/null || echo '') docker-test: setup-test-environment docker exec -it bitrise-main-container bash -c "export INTEGRATION_TEST_BINARY_PATH=\$$PWD/bitrise-cli; go test ./_tests/integration -tags linux_only" @@ -11,4 +12,8 @@ setup-test-environment: build-main-container docker exec -it bitrise-main-container bash -c "go build -o bitrise-cli" build-main-container: - docker-compose -f $(DOCKER_COMPOSE_FILE) up --build -d + @if [ "$$DOCKERCOMPOSE" ]; then \ + docker-compose -f $(DOCKER_COMPOSE_FILE) up --build -d; \ + else \ + docker compose -f $(DOCKER_COMPOSE_FILE) up --build -d; \ + fi