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

Update core version during build #1379

Merged
merged 2 commits into from
Mar 21, 2022
Merged
Changes from 1 commit
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
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ LINT=golangci-lint
MISSPELL=misspell -error
MISSPELL_CORRECTION=misspell -w

BUILD_INFO_IMPORT_PATH=github.com/signalfx/splunk-otel-collector/internal/version
BUILD_INFO_IMPORT_PATH=go.opentelemetry.io/collector/internal/version
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we keep github.com/signalfx/splunk-otel-collector/internal/version, otherwise how will the version get set for https://github.com/signalfx/splunk-otel-collector/blob/main/cmd/otelcol/main.go#L83?

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. I think it should be

BUILD_INFO_IMPORT_PATH=github.com/signalfx/splunk-otel-collector/internal/version
BUILD_INFO_IMPORT_PATH_CORE=go.opentelemetry.io/collector/internal/version

I didn't notice that it was replacement for splunk distro. Now it makes sense why it didn't work before

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. I think it should be

BUILD_INFO_IMPORT_PATH=github.com/signalfx/splunk-otel-collector/internal/version
BUILD_INFO_IMPORT_PATH_CORE=go.opentelemetry.io/collector/internal/version

I didn't notice that it was replacement for splunk distro. Now it makes sense why it didn't work before

Sorry, my bad, it was actually pointing to the version in our distro when I tested it but for the PR somehow I replaced that line, thanks for catching that!

BUILD_INFO_IMPORT_PATH_CORE=github.com/open-telemetry/opentelemetry-collector/internal/version
dmitryax marked this conversation as resolved.
Show resolved Hide resolved
VERSION=$(shell git describe --match "v[0-9]*" HEAD)
BUILD_X1=-X $(BUILD_INFO_IMPORT_PATH).Version=$(VERSION)
BUILD_INFO=-ldflags "${BUILD_X1}"
BUILD_X2=-X $(BUILD_INFO_IMPORT_PATH_CORE).Version=$(VERSION)
BUILD_INFO=-ldflags "${BUILD_X1} ${BUILD_X2}"

SMART_AGENT_RELEASE=$(shell cat internal/buildscripts/packaging/smart-agent-release.txt)
SKIP_COMPILE=false
Expand Down