mirror of https://github.com/grafana/grafana.git
Build(makefile): improve error handling (#17281)
* Build(makefile): improve error handling
Ref baa55ab6ae
This commit is contained in:
parent
1e508d7288
commit
9ff44b5037
13
Makefile
13
Makefile
|
@ -86,16 +86,25 @@ revive: scripts/go/bin/revive
|
||||||
|
|
||||||
# create docker-compose file with provided sources and start them
|
# create docker-compose file with provided sources and start them
|
||||||
# example: make devenv sources=postgres,openldap
|
# example: make devenv sources=postgres,openldap
|
||||||
|
ifeq ($(sources),)
|
||||||
|
devenv:
|
||||||
|
@printf 'You have to define sources for this command \nexample: make devenv sources=postgres,openldap\n'
|
||||||
|
else
|
||||||
devenv: devenv-down
|
devenv: devenv-down
|
||||||
$(eval targets := $(shell echo '$(sources)' | tr "," " "))
|
$(eval targets := $(shell echo '$(sources)' | tr "," " "))
|
||||||
|
|
||||||
@cd devenv; \
|
@cd devenv; \
|
||||||
./create_docker_compose.sh $(targets); \
|
./create_docker_compose.sh $(targets) || \
|
||||||
|
(rm -rf docker-compose.yaml; exit 1)
|
||||||
|
|
||||||
|
@cd devenv; \
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
endif
|
||||||
|
|
||||||
# drop down the envs
|
# drop down the envs
|
||||||
devenv-down:
|
devenv-down:
|
||||||
@cd devenv; docker-compose down;
|
@cd devenv; \
|
||||||
|
docker-compose down;
|
||||||
|
|
||||||
# TODO recheck the rules and leave only necessary exclusions
|
# TODO recheck the rules and leave only necessary exclusions
|
||||||
gosec: scripts/go/bin/gosec
|
gosec: scripts/go/bin/gosec
|
||||||
|
|
Loading…
Reference in New Issue