diff --git a/Makefile b/Makefile index 2dc98f53460..5652c157b2d 100644 --- a/Makefile +++ b/Makefile @@ -283,13 +283,9 @@ run-bra: ## [Deprecated] Build and run web server on filesystem changes. See /.b frontend-service-check: ./devenv/frontend-service/local-init.sh -.PHONY: frontend-service-up -frontend-service-up: frontend-service-check - tilt up -f devenv/frontend-service/Tiltfile - -.PHONY: frontend-service-down -frontend-service-down: frontend-service-check - tilt down -f devenv/frontend-service/Tiltfile +.PHONY: frontend-service +frontend-service: frontend-service-check + bash ./devenv/frontend-service/run.sh ##@ Testing diff --git a/devenv/frontend-service/run.sh b/devenv/frontend-service/run.sh new file mode 100644 index 00000000000..9284d218ab4 --- /dev/null +++ b/devenv/frontend-service/run.sh @@ -0,0 +1,13 @@ +# Script called from makefile to auto down the tilt environment on ctrl + c. +# Paths are relative to the makefile + +function tilt_down() +{ + echo "Tearing down Tilt environment... (this might take a little while)" + tilt down -f devenv/frontend-service/Tiltfile +} + + +trap tilt_down SIGINT + +tilt up -f devenv/frontend-service/Tiltfile \ No newline at end of file