mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Build: make bra a local dependency (#17414)
Same idea as with the `gosec`, `revive` and etc. Allows you to execute `make bra` as pinned local dependency instead as global one. And therefore alleviates dependency installation issues. README also updated - I was thinking to provide verbose installation instructions for it. Since with that way we assume make is installed on the developer system. But it might be premature right now?
This commit is contained in:
25
Makefile
25
Makefile
@@ -57,10 +57,6 @@ test-js:
|
||||
|
||||
test: test-go test-js
|
||||
|
||||
run:
|
||||
@echo "start a server"
|
||||
./bin/grafana-server
|
||||
|
||||
clean:
|
||||
@echo "cleaning"
|
||||
rm -rf node_modules
|
||||
@@ -78,6 +74,10 @@ scripts/go/bin/gosec: scripts/go/go.mod
|
||||
@cd scripts/go; \
|
||||
$(GO) build -o ./bin/gosec github.com/securego/gosec/cmd/gosec
|
||||
|
||||
scripts/go/bin/bra: scripts/go/go.mod
|
||||
@cd scripts/go; \
|
||||
$(GO) build -o ./bin/bra github.com/Unknwon/bra
|
||||
|
||||
revive: scripts/go/bin/revive
|
||||
@scripts/go/bin/revive \
|
||||
-formatter stylish \
|
||||
@@ -89,6 +89,16 @@ revive-alerting: scripts/go/bin/revive
|
||||
-formatter stylish \
|
||||
./pkg/services/alerting/...
|
||||
|
||||
run: scripts/go/bin/bra
|
||||
@scripts/go/bin/bra run
|
||||
|
||||
# TODO recheck the rules and leave only necessary exclusions
|
||||
gosec: scripts/go/bin/gosec
|
||||
@scripts/go/bin/gosec -quiet \
|
||||
-exclude=G104,G107,G201,G202,G204,G301,G304,G401,G402,G501 \
|
||||
-conf=./scripts/go/configs/gosec.json \
|
||||
$(GO_FILES)
|
||||
|
||||
# create docker-compose file with provided sources and start them
|
||||
# example: make devenv sources=postgres,openldap
|
||||
ifeq ($(sources),)
|
||||
@@ -111,10 +121,3 @@ devenv-down:
|
||||
@cd devenv; \
|
||||
test -f docker-compose.yaml && \
|
||||
docker-compose down || exit 0;
|
||||
|
||||
# TODO recheck the rules and leave only necessary exclusions
|
||||
gosec: scripts/go/bin/gosec
|
||||
@scripts/go/bin/gosec -quiet \
|
||||
-exclude=G104,G107,G201,G202,G204,G301,G304,G401,G402,G501 \
|
||||
-conf=./scripts/go/configs/gosec.json \
|
||||
$(GO_FILES)
|
||||
|
||||
Reference in New Issue
Block a user