Skip to content
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.

Update README w/ install instructions for v2.0 #418

Closed
zmb3 opened this issue Dec 26, 2017 · 18 comments
Closed

Update README w/ install instructions for v2.0 #418

zmb3 opened this issue Dec 26, 2017 · 18 comments

Comments

@zmb3
Copy link
Contributor

zmb3 commented Dec 26, 2017

I see the release notes for v2.0 mention that the new direction is to release binaries (including bundled linters).

What’s not clear to me is how this change impacts the recommended way to install gometalinter. Is go get going to be deprecated? Should we just download the binaries and place them on our $PATH? Does the linters directory also need to be in the path or is gometalinter smart enough to look there for tools to exec?

It would be nice if we could update the install and quick start sections of the README to reflect the latest recommendations.

@alecthomas
Copy link
Owner

Yes, good call.

@amimas
Copy link

amimas commented Dec 28, 2017

Please post the new instructions. Also, would you be able to include how to install this using Gradle? I'm using Gradle for build process using following gogradle plugin.

https://github.com/gogradle/gogradle

I'd like to include gometalinter into the overall build process. But, not sure how to set it up. In our CI/CD process, I won't have access to "install" this on the build machines. Even golang is being setup by the build process using gogradle in a temporary location.

@alecthomas
Copy link
Owner

@amimas I can't provide instructions on how to install gometalinter with every CI, that is impractical.

@amimas
Copy link

amimas commented Dec 29, 2017

Definitely agree that it's impractical to provide instructions for every CI. I mentioned about Gradle because that's a very robust build tool than Ant or Maven. It's not necessarily CI.

Maybe I'll be able to figure out how to use it with Gradle once the updated instructions for v2 is available. Thanks

@rliebz
Copy link
Contributor

rliebz commented Jan 6, 2018

Having a small shell script like goreleaser is using would go a long way without having to cater to any specific CI.

alecthomas added a commit that referenced this issue Jan 9, 2018
Fixes #421.

Also see install script mention in #418.
alecthomas added a commit that referenced this issue Jan 15, 2018
Fixes #421.

Also see install script mention in #418.
@polothy
Copy link

polothy commented Feb 1, 2018

Hopefully this is helpful, https://github.com/goreleaser/godownloader

Also, IIRC, goreleaser makes it easy to make and automatically update a homebrew tap repository, if interested. That way folks can use homebrew to automatically install and keep things up-to-date easily.

@alecthomas
Copy link
Owner

I did look at goreleaser but had some issues with environment variables. I have subsequently made it work, so I'll switch to that soon.

godownloader looks interesting, but doesn't support multiple binaries :(

@alecthomas
Copy link
Owner

alecthomas commented Feb 4, 2018

@gudvinr
Copy link

gudvinr commented Feb 26, 2018

That's very sick. So now it's recommended to use precompiled binaries BUT there's no generic instructions for installation and usage.
And how we are supposed to use it? Go tooling was always easy to use as "copy-paste & go" and now metalinter became opposite of that.

@alecthomas
Copy link
Owner

@gudvinr The old way still works fine, but thanks for your constructive input.

@gudvinr
Copy link

gudvinr commented Feb 26, 2018

@alecthomas Thanks for the reply.
Yes, it definetely works fine for now but since this is deprecated way to install I guess it will be eliminated in future. So people think that newer way should be used whenever possible.

I'm sorry that my response sounds rude a bit. But to be honest it's really annoying that one should digging into setup process of tools that supposed to make development process easier.

@alecthomas
Copy link
Owner

There will be instructions added once there's an automated solution. Until then you can continue to use the instructions in the README.

@flyinprogrammer
Copy link

flyinprogrammer commented Feb 28, 2018

for those who might want a godownloader script - i used the generator and then hacked it. which i realize is bad practice, but yeah.

https://github.com/flyinprogrammer/godownloaders/blob/master/download_gometalinter.sh#L52-L58

(probably only supports linux and osx too)

@wknapik
Copy link

wknapik commented Mar 9, 2018

The simplest hack, if you need one:

curl -sLo- https://github.com/alecthomas/gometalinter/releases/download/v2.0.5/gometalinter-2.0.5-linux-amd64.tar.gz|tar -xzC "$GOPATH/bin" --exclude COPYING --exclude README.md --strip-components 1 -f-

@autarch
Copy link

autarch commented Mar 11, 2018

@alecthomas

godownloader looks interesting, but doesn't support multiple binaries :(

It does now. See the discussion in goreleaser/godownloader#52

@alecthomas
Copy link
Owner

@autarch That's awesome, though it looks like there are still a couple of kinks. Once those are fixed I'll make a downloader available. Thanks for creating that issue BTW.

@konradreiche
Copy link

Is there a way to always download the latest release of the binary package? Due to the version encoding in the file name I wouldn't know how.

alecthomas added a commit that referenced this issue May 8, 2018
README will be updated once the script is verified as working widely.
@alecthomas
Copy link
Owner

alecthomas commented May 8, 2018

goreleaser/godownloader now both support multiple binaries. I've added the script. Please test with:

$ export BINDIR=<directory-in-your-$PATH>
$ curl -L https://git.io/vp6lP | bash

eg.

$ curl -L https://git.io/vp6lP | BINDIR=${GOPATH=$HOME/go}/bin bash

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants