fullstorydev / hauser

Service for moving your Fullstory export files to a data warehouse
MIT License
49 stars 23 forks source link

makefile improvements #59

Closed camphillips22 closed 5 years ago

camphillips22 commented 5 years ago

I was running into trouble with installing the external code checking tools (staticcheck, etc.) when running make. This PR employs a fix where the directory is changed to a temporary directory before go get -u is called in order to avoid using the local go.mod.

Another benefit of the changes is that the tools are only fetched if they don't exist in GOBIN.

I also changed the dirs_to_check to be explicit because I was also having trouble with that picking up unwanted directories.

jhump commented 5 years ago

to avoid using the local go.mod

You only need to use GO111MODULE=off to avoid that. However, I must ask: why do you want to avoid using the local go.mod file? Do you mean that you were seeing unintended changes to this file (like the go tool trying to add these tools to go.mod)?

I was also having trouble with that picking up unwanted directories.

What unwanted directories? The build in CI always worked, and I don't remember having any problems myself. I'm wondering what is different about your environment.

camphillips22 commented 5 years ago

Ok, I did some rework to just use GO111MODULE=off for the tools. Also, I changed the find | grep on the dirs_to_check to fix it for my problem. Before, it was including ./.idea so I thought it would be better to just be explicit, but it's probably best to not require changes to the makefile for any added folders.