From 95ea14cc722dfb619da662a5e3e0135e64e55d86 Mon Sep 17 00:00:00 2001 From: Josh Hunt Date: Wed, 20 Aug 2025 18:27:04 +0100 Subject: [PATCH] FS: Replace frontend-service-up with command that auto shuts down (#109933) --- Makefile | 10 +++------- devenv/frontend-service/run.sh | 13 +++++++++++++ 2 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 devenv/frontend-service/run.sh 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