Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make generate-otlp: check that tools are installed #10285

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: making shellcheck happy here.

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
Loading