From f095994f21f9f882ab9f1eee7bb4da7fd7d0b641 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Fri, 6 May 2022 10:18:26 +0200 Subject: [PATCH] Make `internal/version` internal to `internal/otelcontribcore` --- Makefile | 2 +- internal/{ => otelcontribcore/internal}/version/version.go | 2 +- internal/{ => otelcontribcore/internal}/version/version_test.go | 0 internal/otelcontribcore/main.go | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename internal/{ => otelcontribcore/internal}/version/version.go (92%) rename internal/{ => otelcontribcore/internal}/version/version_test.go (100%) diff --git a/Makefile b/Makefile index d3ba0737242c..0442f396c332 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ RUN_CONFIG?=local/config.yaml CMD?= OTEL_VERSION=main -BUILD_INFO_IMPORT_PATH=github.com/open-telemetry/opentelemetry-collector-contrib/internal/version +BUILD_INFO_IMPORT_PATH=github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelcontribcore/internal/version VERSION=$(shell git describe --always --match "v[0-9]*" HEAD) BUILD_INFO=-ldflags "-X $(BUILD_INFO_IMPORT_PATH).Version=$(VERSION)" diff --git a/internal/version/version.go b/internal/otelcontribcore/internal/version/version.go similarity index 92% rename from internal/version/version.go rename to internal/otelcontribcore/internal/version/version.go index 45d973d2becc..9531383a5ac0 100644 --- a/internal/version/version.go +++ b/internal/otelcontribcore/internal/version/version.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package version // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/version" +package version // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelcontribcore/internal/version" // Version variable will be replaced at link time after `make` has been run. var Version = "latest" diff --git a/internal/version/version_test.go b/internal/otelcontribcore/internal/version/version_test.go similarity index 100% rename from internal/version/version_test.go rename to internal/otelcontribcore/internal/version/version_test.go diff --git a/internal/otelcontribcore/main.go b/internal/otelcontribcore/main.go index ffdea09469a5..3d958c4c9c1e 100644 --- a/internal/otelcontribcore/main.go +++ b/internal/otelcontribcore/main.go @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/service" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/version" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelcontribcore/internal/version" ) type ComponentsFunc func() (component.Factories, error)