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

First pass at a Makefile #61

Merged
merged 2 commits into from
Aug 9, 2019

Conversation

fearful-symmetry
Copy link
Contributor

@fearful-symmetry fearful-symmetry commented Aug 8, 2019

This is a first attempt at a basic makefile, with the goal being that make update should run everything that needs to be run in order for the CI to pass its initial checks.

I don't know if I've ever seen someone use file targets to install go binaries, but it seems to work.

I'd like to add a helptext and some kind of linter, but I'd like to get the basics squared away first.

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

WDYT about using mage instead? I think it uses to be less problematic for go developers in Windows and it would be aligned with Beats.

@fearful-symmetry
Copy link
Contributor Author

I talked about that with @andrewkroh and we both thought mage was a decent solution because of how small the makefile is and how few targets we have. Most of our docs in beats, IIRC, actually tell people to use make fmt and so on.

Is this an issue for windows developers?

@jsoriano
Copy link
Member

jsoriano commented Aug 9, 2019

I talked about that with @andrewkroh and we both thought mage was a decent solution because of how small the makefile is and how few targets we have. Most of our docs in beats, IIRC, actually tell people to use make fmt and so on.

Ok then.

Is this an issue for windows developers?

I have found it tricky, but not sure, maybe it is my little experience developing on windows. On the other hand mage can be installed with go get.

@fearful-symmetry fearful-symmetry merged commit 4a217fc into elastic:master Aug 9, 2019
@andrewkroh
Copy link
Member

I would be good with either make or mage. Of course mage is more cross-platform (Windows) friendly, but there is a bit of boilerplate that needs to be added. IMHO we need to setup a separate project containing the mage boilerplate that we can reuse in all of these small projects that just want to run goimports or go-licenser for example.

@jsoriano
Copy link
Member

IMHO we need to setup a separate project containing the mage boilerplate that we can reuse in all of these small projects that just want to run goimports or go-licenser for example.

@andrewkroh related, but not a separated project yet elastic/beats#13215 🙂

@fearful-symmetry
Copy link
Contributor Author

IMHO we need to setup a separate project containing the mage boilerplate that we can reuse in all of these small projects that just want to run goimports or go-licenser for example.

That would be a good idea, assuming it was fairly generic. The beat build tools are...incredibly heavy. Some generic make/mage roles and variables would be good, though.

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