Skip to content

fix: check OS and arch in make install-ocb to get correct version #150

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

Merged
merged 1 commit into from
Dec 19, 2024
Merged
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
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Uncomment to use OTEL Collector Builder installed by `install-ocb`
OCB=$(HOME)/bin/ocb
OCB = $(HOME)/bin/ocb
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
OS = linux
endif
ifeq ($(UNAME_S),Darwin)
OS = darwin
endif
OCB_VERSION = 0.114.0
ARCH := $(shell arch)
ifeq ($(ARCH),x86_64)
ARCH = amd64
endif

# Uncomment to use OTEL Collector Builder installed by
# `go install go.opentelemetry.io/collector/cmd/[email protected]`
Expand Down Expand Up @@ -29,8 +41,8 @@ release:
## install-ocb: Installs correct version of ocb binary
install-ocb:
@mkdir -p "$(HOME)/bin"
curl --proto '=https' --tlsv1.2 -L -o "$(HOME)/bin/ocb" https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/cmd%2Fbuilder%2Fv0.110.0/ocb_0.110.0_darwin_arm64
@chmod +x "$(HOME)/bin/ocb"
curl --proto "=https" --tlsv1.2 -L -o "$(OCB)" "https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/cmd%2Fbuilder%2Fv$(OCB_VERSION)/ocb_$(OCB_VERSION)_$(OS)_$(ARCH)"
@chmod +x "$(OCB)"

## build-ocb: Builds project using ocb
build-ocb:
Expand Down
Loading