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 all 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
4 changes: 3 additions & 1 deletion .ci/scripts/update-beats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ 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 docs/version.asciidoc
find . -maxdepth 2 -name Dockerfile -exec git add {} \;

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

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ html_docs
/docker-compose.override.yml
/config.mk
/systemtest/logs
docker-compose.yml.bck
docker-compose.yml.bck
Dockerfile.bck
version.asciidoc.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
find . -maxdepth 2 -name Dockerfile -exec sed -i'.bck' -E -e "s#(FROM golang):[0-9]+\.[0-9]+\.[0-9]+#\1:$$(cat .go-version)#g" {} \;
sed -i'.bck' -E -e "s#(:go-version): [0-9]+\.[0-9]+\.[0-9]+#\1: $$(cat .go-version)#g" docs/version.asciidoc

##############################################################################
# Kibana synchronisation.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To get started with APM, see our [Quick start guide](https://www.elastic.co/guid

### Requirements

* [Golang](https://golang.org/dl/) 1.16.6
* [Golang](https://golang.org/dl/) 1.16.x

### Install

Expand Down