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

chore: update-beats goal to bump the go version #5778

Merged
merged 7 commits into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
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: 5 additions & 1 deletion .ci/scripts/update-beats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ make update-beats
COMMIT_MESSAGE="Update to elastic/beats@$(go list -m -f {{.Version}} github.com/elastic/beats/... | cut -d- -f3)"

git checkout -b "update-beats-$(date "+%Y%m%d%H%M%S")"
git add go.mod go.sum NOTICE.txt
git add go.mod go.sum NOTICE.txt .go-version
find . -maxdepth 2 -name Dockerfile -print0 | while IFS= read -r -d '' line; do
git add $line
done
v1v marked this conversation as resolved.
Show resolved Hide resolved

git diff --staged --quiet || git commit -m "$COMMIT_MESSAGE"
git --no-pager log -1

Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ html_docs
/docker-compose.override.yml
/config.mk
/systemtest/logs
docker-compose.yml.bck
docker-compose.yml.bck
Dockerfile.bck
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ update-beats: update-beats-module update
.PHONY: update-beats-module
update-beats-module:
$(GO) get -d -u $(BEATS_MODULE)@$(BEATS_VERSION) && $(GO) mod tidy
diff -u .go-version $$($(GO) list -m -f {{.Dir}} $(BEATS_MODULE))/.go-version \
|| { code=$$?; echo ".go-version out of sync with Beats"; exit $$code; }
cp -f $$($(GO) list -m -f {{.Dir}} $(BEATS_MODULE))/.go-version .go-version
sed -i'.bck' -E -e "s#(FROM golang):[0-9]+\.[0-9]+\.[0-9]+#\1:$$(cat .go-version)#g" tests/Dockerfile
sed -i'.bck' -E -e "s#(FROM golang):[0-9]+\.[0-9]+\.[0-9]+#\1:$$(cat .go-version)#g" Dockerfile
Copy link
Member

Choose a reason for hiding this comment

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

can/should we also update docs/version.asciidoc here?

https://github.com/elastic/apm-server/blame/master/docs/version.asciidoc#L3


##############################################################################
# Kibana synchronisation.
Expand Down