-
Notifications
You must be signed in to change notification settings - Fork 208
Autobump Collector VERSION to latest on build - #1401
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
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
76b9f30
Auto increment version
nslaughter 8a723fe
Merge branch 'main' into autobump-collector-version
nslaughter 42dc315
fix(makefile): update versioning mechanism for OpenTelemetry Collector
nslaughter 5f84af7
fix(makefile): update versioning mechanism for OpenTelemetry Collector
nslaughter acbc01d
chore: remove VERSION file and update gitignore
nslaughter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,13 @@ BASE_SPACE:=$(shell pwd) | |
BUILD_SPACE:=$(BASE_SPACE)/build | ||
BUCKET_NAME:=lambda-artifacts-$(shell dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \t\n') | ||
LAYER_NAME:=otel-collector | ||
|
||
VERSION=$(shell cat VERSION) | ||
OTELCOL_VERSION="UNSET" # run recipe set-otelcol-version to get this | ||
GIT_SHA=$(shell git rev-parse HEAD) | ||
GOARCH ?= amd64 | ||
GOBUILD=GO111MODULE=on CGO_ENABLED=0 installsuffix=cgo go build -trimpath | ||
BUILD_INFO_IMPORT_PATH=main | ||
|
||
LDFLAGS=-ldflags "-s -w -X $(BUILD_INFO_IMPORT_PATH).GitHash=$(GIT_SHA) -X $(BUILD_INFO_IMPORT_PATH).Version=$(VERSION) \ | ||
LDFLAGS=-ldflags "-s -w -X $(BUILD_INFO_IMPORT_PATH).GitHash=$(GIT_SHA) -X $(BUILD_INFO_IMPORT_PATH).Version=$(OTELCOL_VERSION) \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL variables in Makefiles are dynamically expanded. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
-X github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter.collectorDistribution=opentelemetry-collector-lambda" | ||
|
||
TOOLS_MOD_DIR := ./internal/tools | ||
|
@@ -34,7 +33,7 @@ clean: | |
rm -rf build/ | ||
|
||
.PHONY: build | ||
build: clean | ||
build: clean set-otelcol-version | ||
@echo Building otel collector extension | ||
mkdir -p $(BUILD_SPACE)/extensions | ||
GOOS=linux GOARCH=$(GOARCH) $(GOBUILD) $(LDFLAGS) -o $(BUILD_SPACE)/extensions . | ||
|
@@ -56,6 +55,11 @@ publish-layer: package | |
aws lambda publish-layer-version --layer-name $(LAYER_NAME) --zip-file fileb://$(BUILD_SPACE)/opentelemetry-collector-layer-$(GOARCH).zip --compatible-runtimes nodejs14.x nodejs16.x nodejs18.x java11 python3.8 python3.9 python3.10 python3.11 --query 'LayerVersionArn' --output text | ||
@echo OpenTelemetry Collector layer published. | ||
|
||
.PHONY: set-otelcol-version | ||
set-otelcol-version: | ||
@OTELCOL_VERSION=$$(grep "go.opentelemetry.io/collector/otelcol v" go.mod | awk '{print $$2; exit}'); \ | ||
echo $$OTELCOL_VERSION > VERSION; \ | ||
|
||
.PHONY: gotidy | ||
gotidy: | ||
@$(MAKE) for-all-target TARGET="tidy" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v0.91.0 | ||
v0.102.1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.