diff --git a/Makefile b/Makefile index c8d2fc5..9e55281 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,12 @@ STOP_SVCS = $(shell tac .services | grep -v \\\#) # List of hosts available in devenv HOSTS_LINES = $(shell grep -Rl IPV4_PREFIX ./services/* | grep .hosts) +# Paths to protocol.privnet.yml +MORPH_CHAIN_PROTOCOL = './services/morph_chain/protocol.privnet.yml' +CHAIN_PROTOCOL = './services/chain/protocol.privnet.yml' + +# List of grepped environment variables from *.env +GREP_DOTENV = $(shell find . -name '*.env' -exec grep -rhv -e '^\#' -e '^$$' {} + ) # Pull all required Docker images .PHONY: pull @@ -86,3 +92,10 @@ clean: done fi done + +# Generate environment +.PHONY: env +env: + @$(foreach envvar,$(GREP_DOTENV),echo $(envvar);) + @echo MORPH_BLOCK_TIME=$(shell grep 'SecondsPerBlock' $(MORPH_CHAIN_PROTOCOL) | awk '{print $$2}')s + @echo MAINNET_BLOCK_TIME=$(shell grep 'SecondsPerBlock' $(CHAIN_PROTOCOL) | awk '{print $$2}')s