+add makefile.start and makefile.stop checks if the environment is already started/stopped
This commit is contained in:
parent
575cf402f8
commit
13f35eb71c
3
Makefile
3
Makefile
|
@ -1,4 +1,5 @@
|
||||||
start:
|
start:
|
||||||
|
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
|
||||||
@echo "> [1] pre-start script";
|
@echo "> [1] pre-start script";
|
||||||
@bash ./metactl/pre-start.sh && echo "< done" || (echo "< failed"; exit 1);
|
@bash ./metactl/pre-start.sh && echo "< done" || (echo "< failed"; exit 1);
|
||||||
@echo;
|
@echo;
|
||||||
|
@ -9,6 +10,7 @@ start:
|
||||||
@bash ./metactl/post-start.sh && echo "< done" || (echo "< failed"; exit 1);
|
@bash ./metactl/post-start.sh && echo "< done" || (echo "< failed"; exit 1);
|
||||||
|
|
||||||
start-no-cache:
|
start-no-cache:
|
||||||
|
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
|
||||||
@echo "> [1] pre-start script";
|
@echo "> [1] pre-start script";
|
||||||
@bash ./metactl/pre-start.sh && echo "< done" || (echo "< failed"; exit 1);
|
@bash ./metactl/pre-start.sh && echo "< done" || (echo "< failed"; exit 1);
|
||||||
@echo;
|
@echo;
|
||||||
|
@ -19,6 +21,7 @@ start-no-cache:
|
||||||
@bash ./metactl/post-start.sh && echo "< done" || (echo "< failed"; exit 1);
|
@bash ./metactl/post-start.sh && echo "< done" || (echo "< failed"; exit 1);
|
||||||
|
|
||||||
stop:
|
stop:
|
||||||
|
@test "`docker-compose ps | wc -l`" -gt "2" || (echo -e "/!\\ no running environment\n"; exit 1);
|
||||||
@echo "> [1] pre-stop script";
|
@echo "> [1] pre-stop script";
|
||||||
@bash ./metactl/pre-stop.sh && echo "< done" || (echo "< failed"; exit 1);
|
@bash ./metactl/pre-stop.sh && echo "< done" || (echo "< failed"; exit 1);
|
||||||
@echo;
|
@echo;
|
||||||
|
|
Loading…
Reference in New Issue