diff --git a/Makefile b/Makefile index 41917e7e67..7d1f76ed42 100644 --- a/Makefile +++ b/Makefile @@ -111,7 +111,7 @@ update-ot: install-gsed @test $(OT_CORE_NEW) || (echo "usage: make update-ot OT_CORE_NEW=x.x.x OT_CONTRIB_NEW=y.y.y"; exit 1); @test $(OT_CONTRIB_NEW) || (echo "usage: make update-ot OT_CORE_NEW=x.x.x OT_CONTRIB_NEW=y.y.y"; exit 1); @echo "Updating OT core from $(OT_CORE_VERSION) to $(OT_CORE_NEW) and OT contrib from $(OT_CONTRIB_VERSION) to $(OT_CONTRIB_NEW)" - $(SED) -i "s/\(version:\) $(OT_CORE_VERSION)$$/\1 $(OT_CORE_NEW)/" otelcolbuilder/.otelcol-builder.yaml + $(shell yq e ".dist.version = \"${OT_CORE_NEW}\"" -i otelcolbuilder/.otelcol-builder.yaml) $(SED) -i "s/\(go\.opentelemetry\.io\/collector\/.*\) v$(OT_CORE_VERSION)$$/\1 v$(OT_CORE_NEW)/" otelcolbuilder/.otelcol-builder.yaml $(SED) -i "s/\(github\.com\/open-telemetry\/opentelemetry-collector-contrib\/.*\) v$(OT_CONTRIB_VERSION)$$/\1 v$(OT_CONTRIB_NEW)/" otelcolbuilder/.otelcol-builder.yaml $(SED) -i "s/$(OT_CORE_VERSION)/$(OT_CORE_NEW)/" otelcolbuilder/Makefile diff --git a/otelcolbuilder/Makefile b/otelcolbuilder/Makefile index 73671bcb92..84fbf41af3 100644 --- a/otelcolbuilder/Makefile +++ b/otelcolbuilder/Makefile @@ -102,7 +102,7 @@ endif .PHONY: _builder _builder: - $(eval VERSION ?= $(shell git describe --tags --abbrev=5 --match "v[0-9]*")) + $(eval VERSION ?= $(shell git describe --tags --abbrev=5 --match "v[0-9]*"| sed 's/^v//')) $(shell yq e ".dist.version = \"${VERSION}${FIPS_SUFFIX}\"" -i .otelcol-builder.yaml) $(eval SUMOVERSION ?= $(shell yq '.dist.version' .otelcol-builder.yaml)) @echo "Building otelcol-sumo version: $(SUMOVERSION)"