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

Docs: use a simple clone in the New Beat guide #6786

Merged
merged 1 commit into from
Apr 6, 2018
Merged
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
11 changes: 5 additions & 6 deletions docs/devguide/newbeat.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,16 @@ For general information about contributing to Beats, see <<beats-contributing>>.

After you have https://golang.org/doc/install[installed Go] and set up the
https://golang.org/doc/code.html#GOPATH[GOPATH] environment variable to point to
your preferred workspace location, a simple way of getting the source code for
Beats, including libbeat and the Beat generator, is to do:
your preferred workspace location, clone the Beats repository in the correct location
under `GOPATH`:

[source,shell]
----------------------------------------------------------------------
go get github.com/elastic/beats
mkdir -p ${GOPATH}/src/github.com/elastic
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember this being our initial version but people struggled with setting the GOPATH. Now that since the more recent golang versions have a predefined go path, this should be less of an issue.

git clone https://github.com/elastic/beats ${GOPATH}/src/elastic/beats
----------------------------------------------------------------------

When you run the command, all source files are downloaded to the
`$GOPATH/src/github.com/elastic/beats` path. You can ignore the "no buildable Go source files" message because
you will build the source later. By default `go get` fetches the master branch. To build your beat
To build your beat
on a specific version of libbeat, check out the specific branch ({doc-branch} in the example below):

["source","sh",subs="attributes"]
Expand Down