Skip to content

Commit

Permalink
Update core version during build (#1379)
Browse files Browse the repository at this point in the history
* Update core version during build

During build we need to also update the core version file, otherwise, the internal metrics show "latest" instead of the real version.

* Update Makefile
  • Loading branch information
emaderer authored Mar 21, 2022
1 parent c572016 commit ba22ba3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ MISSPELL=misspell -error
MISSPELL_CORRECTION=misspell -w

BUILD_INFO_IMPORT_PATH=github.com/signalfx/splunk-otel-collector/internal/version
BUILD_INFO_IMPORT_PATH_CORE=go.opentelemetry.io/collector/internal/version
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

0 comments on commit ba22ba3

Please sign in to comment.