Add env target in Makefile
Signed-off-by: EliChin <elizaveta@nspcc.ru>
This commit is contained in:
parent
c5ba3cfc49
commit
66f88294a6
1 changed files with 13 additions and 0 deletions
13
Makefile
13
Makefile
|
@ -32,6 +32,12 @@ STOP_SVCS = $(shell tac .services | grep -v \\\#)
|
||||||
# List of hosts available in devenv
|
# List of hosts available in devenv
|
||||||
HOSTS_LINES = $(shell grep -Rl IPV4_PREFIX ./services/* | grep .hosts)
|
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
|
# Pull all required Docker images
|
||||||
.PHONY: pull
|
.PHONY: pull
|
||||||
|
@ -86,3 +92,10 @@ clean:
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
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
|
||||||
|
|
Loading…
Reference in a new issue