-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Update generator docs to use specific version #3197
Conversation
[source,bash] | ||
---- | ||
cd $GOPATH/src/github.com/elastic/beats | ||
git checkout 5.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could you {doc_branch} here but that will not work in the docs above which are also shown on Github. We have to find some simplification here in the future.
This change needs backport to 5.0 and 5.1 |
aea1299
to
45f53fd
Compare
[source,bash,,subs="attributes"] | ||
---- | ||
cd $GOPATH/src/github.com/elastic/beats | ||
git checkout {doc-branch} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dedemorton I tried sub="attributes"
here so the variable gets replaced. This does not seem to work. If I leave out one , I get a different error. Any idea on how this is best done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try this instead: ["source","sh",subs="attributes"]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems to work. Thanks.
other than the tagging you asked about, LGTM |
* All docs are now in one place which simplifies handling * Specific branch to start your beat on was defined to prevent people using master This change will prevent people creating a new beat to rely on master and have a stable branch for development. This also allows us to modify the generator without having all docs out of sync directly. The blog post "Build your own beat" should be updated with an "update note" about checking out branch 5.1: https://www.elastic.co/blog/build-your-own-beat Further changes: * Add golang version to version.asciidoc file * Remove copied version.asciidoc files and link global file
45f53fd
to
668b0d7
Compare
Currently cookiecutter is needed to generate a beat. This adds an additional dependency to generate a beat and does not give us a lot of control over which checks should be executed during execution. As our template is quite simple it can be done with basic string replacements. A simple python script is now done for the task which leads to less inputs needed by the user and allows us to do checks like GOPATH setup etc. The script could potentially be done in Golang but the setup of python is needed anyways for development. Further changes: * Rename .go files to .go.tmpl so they are not checked for correct syntax * Update documentation NOTES: * Changes for the metricbeat generator will follow in a second PR. * Blog post about creating a beat should be updated to point to 5.1. See elastic#3197
Currently cookiecutter is needed to generate a beat. This adds an additional dependency to generate a beat and does not give us a lot of control over which checks should be executed during execution. As our template is quite simple it can be done with basic string replacements. A simple python script is now done for the task which leads to less inputs needed by the user and allows us to do checks like GOPATH setup etc. The script could potentially be done in Golang but the setup of python is needed anyways for development. Further changes: * Rename .go files to .go.tmpl so they are not checked for correct syntax * Update documentation NOTES: * Changes for the metricbeat generator will follow in a second PR. * Blog post about creating a beat should be updated to point to 5.1. See #3197
This change will prevent people creating a new beat to rely on master and have a stable branch for development. This also allows us to modify the generator without having all docs out of sync directly.
The blog post "Build your own beat" should be updated with an "update note" about checking out branch 5.1: https://www.elastic.co/blog/build-your-own-beat
This is in preparation for #2996