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

Update generator docs to use specific version #3197

Merged
merged 1 commit into from
Dec 22, 2016

Conversation

ruflin
Copy link
Member

@ruflin ruflin commented Dec 15, 2016

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

[source,bash]
----
cd $GOPATH/src/github.com/elastic/beats
git checkout 5.1
Copy link
Member Author

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.

@ruflin ruflin added the needs_backport PR is waiting to be backported to other branches. label Dec 15, 2016
@ruflin
Copy link
Member Author

ruflin commented Dec 15, 2016

This change needs backport to 5.0 and 5.1

@ruflin ruflin added in progress Pull request is currently in progress. and removed review labels Dec 16, 2016
@ruflin ruflin force-pushed the generator-version-update branch from aea1299 to 45f53fd Compare December 16, 2016 09:59
[source,bash,,subs="attributes"]
----
cd $GOPATH/src/github.com/elastic/beats
git checkout {doc-branch}
Copy link
Member Author

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?

Copy link
Contributor

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"]

Copy link
Member Author

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.

@dedemorton
Copy link
Contributor

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
@ruflin ruflin force-pushed the generator-version-update branch from 45f53fd to 668b0d7 Compare December 22, 2016 09:30
@ruflin ruflin removed the in progress Pull request is currently in progress. label Dec 22, 2016
@urso urso merged commit d6be3b8 into elastic:master Dec 22, 2016
@ruflin ruflin deleted the generator-version-update branch January 9, 2017 12:48
ruflin added a commit to ruflin/beats that referenced this pull request Jan 9, 2017
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
monicasarbu pushed a commit that referenced this pull request Jan 13, 2017
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
@ruflin ruflin removed the needs_backport PR is waiting to be backported to other branches. label Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants