[Makefile] make titles bold to delimit 'docker-compose' output

This commit is contained in:
xdrm-brackets 2018-03-15 12:23:11 +01:00
parent 33e6992be8
commit ecbde7f7db
1 changed files with 29 additions and 25 deletions

View File

@ -1,44 +1,48 @@
start:
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
@echo "> [1] pre-start script";
@bash ./metactl/pre-start.sh && echo "< done" || (echo "< failed"; exit 1);
@echo -e "\e[33m> [1] pre-start script\e[0m";
@bash ./metactl/pre-start.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo;
@echo "> [2] Build & launch environment";
@echo -e "\e[33m> [2] Build & launch environment\e[0m";
@echo;
@docker-compose up -d && echo "< done" || (echo "< failed"; exit 1);
@docker-compose up -d && echo -e "\e[33m< done\e[0m" || (echo "\e[33m< failed\e[0m"; exit 1);
@echo;
@echo "> [3] post-start script";
@bash ./metactl/post-start.sh && echo "< done" || (echo "< failed"; exit 1);
@echo -e "\e[33m> [3] post-start script\e[0m";
@bash ./metactl/post-start.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo -e "\e[0m";
start-no-log:
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
@echo "> [1] pre-start script";
@bash ./metactl/pre-start.sh && echo "< done" || (echo "< failed"; exit 1);
@echo -e "\e[33m> [1] pre-start script\e[0m";
@bash ./metactl/pre-start.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo;
@echo "> [2] Build & launch environment";
@docker-compose up -d > /dev/null 2>&1 && echo "< done" || (echo "< failed"; exit 1);
@echo -e "\e[33m> [2] Build & launch environment\e[0m";
@docker-compose up -d > /dev/null 2>&1 && echo -e "\e[33m< done\e[0m" || (echo "\e[33m< failed\e[0m"; exit 1);
@echo;
@echo "> [3] post-start script";
@bash ./metactl/post-start.sh && echo "< done" || (echo "< failed"; exit 1);
@echo -e "\e[33m> [3] post-start script\e[0m";
@bash ./metactl/post-start.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo -e "\e[0m";
start-no-cache:
start:
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
@echo "> [1] pre-start script";
@bash ./metactl/pre-start.sh && echo "< done" || (echo "< failed"; exit 1);
@echo -e "\e[33m> [1] pre-start script\e[0m";
@bash ./metactl/pre-start.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo;
@echo "> [2] Build & launch environment";
@docker-compose up -d --build > /dev/null 2>&1 && echo "< done" || (echo "< failed"; exit 1);
@echo -e "\e[33m> [2] Build & launch environment\e[0m";
@echo;
@echo "> [3] post-start script";
@bash ./metactl/post-start.sh && echo "< done" || (echo "< failed"; exit 1);
@docker-compose up -d --build && echo -e "\e[33m< done\e[0m" || (echo "\e[33m< failed\e[0m"; exit 1);
@echo;
@echo -e "\e[33m> [3] post-start script\e[0m";
@bash ./metactl/post-start.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo -e "\e[0m";
stop:
@test "`docker-compose ps | wc -l`" -gt "2" || (echo -e "/!\\ no running environment\n"; exit 1);
@echo "> [1] pre-stop script";
@bash ./metactl/pre-stop.sh && echo "< done" || (echo "< failed"; exit 1);
@echo -e "\e[33m> [1] pre-stop script\e[0m";
@bash ./metactl/pre-stop.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo;
@echo "> [2] Stop and remove environment";
@docker-compose down --remove-orphans > /dev/null 2>&1 && echo "< done" || (echo "< failed"; exit 1);
@echo -e "\e[33m> [2] Stop and remove environment\e[0m";
@docker-compose down --remove-orphans > /dev/null 2>&1 && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo;
@echo "> [3] post-stop script";
@bash ./metactl/post-stop.sh && echo "< done" || (echo "< failed"; exit 1);
@echo -e "\e[33m> [3] post-stop script\e[0m";
@bash ./metactl/post-stop.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);