From 44615f4a7a4e3954e2f3a59248370daa05d3f02a Mon Sep 17 00:00:00 2001 From: Ryan Bunney Date: Tue, 9 Jul 2024 12:06:43 +0800 Subject: [PATCH] Check and use alternate docker compose option --- build_eagle.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/build_eagle.sh b/build_eagle.sh index 8c0ee4235..56b036cdd 100755 --- a/build_eagle.sh +++ b/build_eagle.sh @@ -1,23 +1,32 @@ +COMPOSE="docker-compose" + +# Check if the user has a different docker compose setup +if ! command -v $COMPOSE +then + COMPOSE="docker compose" +fi + + case "$1" in "dep") export VCS_TAG=`git describe --tags --abbrev=0|sed s/v//` echo "Building EAGLE version ${VCS_TAG}" python updateVersion.py - docker-compose -f ./docker/docker-compose.dep.yml build + $COMPOSE -f ./docker/docker-compose.dep.yml build echo "Build finished!" exit 1 ;; "dev") export VCS_TAG=`git rev-parse --abbrev-ref HEAD` echo "Building EAGLE development version" python updateVersion.py - docker-compose -f ./docker/docker-compose.dev.yml build + $COMPOSE -f ./docker/docker-compose.dev.yml build echo "Build finished!" exit 1;; "slim") export VCS_TAG=`git describe --tags --abbrev=0|sed s/v//` echo "Building EAGLE slim version ${VCS_TAG}" python updateVersion.py - docker-compose -f ./docker/docker-compose.dep.yml build + $COMPOSE -f ./docker/docker-compose.dep.yml build echo "Build finished! Slimming the image now" echo "This requires to interact with the intermediate server." echo "Please open the EAGLE settings and put the gitHub and gitLab API keys in"