From 8a5a6d810ae9677bcfb83b5e6daf914393799fa8 Mon Sep 17 00:00:00 2001 From: Jayendra Parsai Date: Tue, 24 Sep 2024 12:14:43 +0530 Subject: [PATCH] chore: use goreman to start principal and agent Signed-off-by: Jayendra Parsai --- Makefile | 7 +++++++ hack/demo-env/Procfile | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 hack/demo-env/Procfile diff --git a/Makefile b/Makefile index 24feae6..9268a3e 100644 --- a/Makefile +++ b/Makefile @@ -21,9 +21,16 @@ PROTOC_GEN_GO_GRPC_VERSION=v1.2 GOLANG_CI_LINT_VERSION=v1.58.1 MOCKERY_V2_VERSION?=v2.43.0 +AUTONOMOUS_MODE?=false +GOBIN=$(shell go env GOPATH)/bin + .PHONY: build build: agent principal +.PHONY: start-local +start-local: + AUTONOMOUS_MODE=$(AUTONOMOUS_MODE) $(GOBIN)/goreman -set-ports=false -f hack/demo-env/Procfile start + .PHONY: test test: mkdir -p test/out diff --git a/hack/demo-env/Procfile b/hack/demo-env/Procfile new file mode 100644 index 0000000..6abb927 --- /dev/null +++ b/hack/demo-env/Procfile @@ -0,0 +1,2 @@ +principal: hack/demo-env/start-principal.sh +agent: if [ "$AUTONOMOUS_MODE" = "true" ]; then hack/demo-env/start-agent-autonomous.sh; else hack/demo-env/start-agent-managed.sh; fi