diff --git a/scripts/grafana-server/start-server b/scripts/grafana-server/start-server index 01ab1b4dbf1..71b6f929510 100755 --- a/scripts/grafana-server/start-server +++ b/scripts/grafana-server/start-server @@ -22,6 +22,13 @@ fi echo starting server +# air now deletes the binary, so we check if we need to build it before trying to start the server +# see https://github.com/air-verse/air/issues/525 +# if this gets resolved, we could remove the go build and rely on the binary being present as before +if [[ ! -f ./bin/grafana ]]; then + make GO_BUILD_DEV=1 build-go-fast +fi + cp -r ./bin $RUNDIR cp -r ./tools $RUNDIR ln -s $(realpath ./public) $RUNDIR