Skip to content

Commit

Permalink
chore: update-beats goal to bump the go version (#5778)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Jul 22, 2021
1 parent 790536a commit bcd5bb6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
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

0 comments on commit bcd5bb6

Please sign in to comment.