Skip to content

Commit

Permalink
make generate-otlp: check that tools are installed
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Zaytsev <[email protected]>
  • Loading branch information
colega committed Dec 19, 2024
1 parent 45cd8ed commit 27d3757
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/distributor/otlp/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@

set -euo pipefail

command -v gopatch >/dev/null 2>&1 || { echo "Please install gopatch. Run 'go install github.com/uber-go/gopatch@latest' or visit https://github.com/uber-go/gopatch for more info."; exit 1; }
command -v goimports >/dev/null 2>&1 || { echo "Please install goimports. Run 'go install golang.org/x/tools/cmd/goimports@latest' or visit https://pkg.go.dev/golang.org/x/tools/cmd/goimports for more info."; exit 1; }

# Use GNU sed on MacOS falling back to `sed` everywhere else
SED=sed
SED="sed"
type gsed >/dev/null 2>&1 && SED=gsed

FILES=$(find ../../../vendor/github.com/prometheus/prometheus/storage/remote/otlptranslator/prometheusremotewrite -name '*.go' ! -name timeseries.go ! -name "*_test.go")
Expand Down

0 comments on commit 27d3757

Please sign in to comment.