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

Unable to install using script from goreleaser.com #575

Closed
subosito opened this issue Jun 13, 2019 · 8 comments
Closed

Unable to install using script from goreleaser.com #575

subosito opened this issue Jun 13, 2019 · 8 comments
Labels
area: install Issue relates to installation or downloading process

Comments

@subosito
Copy link

Installing golangci-lint using script from goreleaser.com, failed:

•|• curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh
golangci/golangci-lint info checking GitHub for latest tag
golangci/golangci-lint info found version: 1.17.1 for v1.17.1/darwin/amd64
•/• echo $?
1

While using fallback script, it works fine:

•|• curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh
golangci/golangci-lint info checking GitHub for latest tag
golangci/golangci-lint info found version: 1.17.1 for v1.17.1/darwin/amd64
golangci/golangci-lint info installed ./bin/golangci-lint
•|• echo $?
0
•|• ./bin/golangci-lint --version
golangci-lint has version 1.17.1 built from 4ba2155 on 2019-06-10T09:07:35Z
@ivantedja
Copy link

Screen Shot 2019-06-13 at 11 05 58 AM

Somehow the script from goreleaser doesn't have BINARY variable

@flimzy
Copy link

flimzy commented Jun 13, 2019

A temporary work-around, to get your CI pipline working again immediately, is to update your install command:

curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | BINARY=golangci-lint sh -s -- -b $(go env GOPATH)/bin v1.17.1

Note the addition of the BINARY=golang-ci variable after the pipe (|) character.

@iliapolo
Copy link

@flimzy

A temporary work-around, to get your CI pipline working again immediately, is to update your install command:

curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | BINARY=golangci-lint sh -s -- -b $(go env GOPATH)/bin v1.17.1

Note the addition of the BINARY=golang-ci variable after the pipe (|) character.

While this does the trick, I wonder if a different approach is better.

I noticed that the install.sh in github does contain the variable, which means that the script in goreleaser.com somehow diverged from the one here.

To avoid these things, and actually use a static version of the script for reproducible builds, I changed the URL to simply point to a specific tag in this repo.

i.e https://raw.githubusercontent.com/golangci/golangci-lint/v1.16.0/install.sh

What do you think?

I'd appreciate one of the maintainers to confirm this is a valid approach, just to make sure I can rely on this tag to be frozen and contain all the necessary installation features as the script in goreleaser.com does.

@pierrre
Copy link
Contributor

pierrre commented Jun 13, 2019

@iliapolo I like this approach.
It would allow reproducible build.
It could be great if goreleaser could support that too.

matthiasr pushed a commit to prometheus/prometheus that referenced this issue Jun 13, 2019
The version on goreleaser is broken and different from the one in
Github: golangci/golangci-lint#575 – use the direct Github URL as a
workaround.

Additionally, the installer script attempts to `install -d /go/bin` on
CircleCI, which doesn't work due to permissions. Patch that line out –
we don't need it because we make sure the directory exists anyway.

Signed-off-by: Matthias Rampke <[email protected]>
Helcaraxan added a commit to Helcaraxan/gomod that referenced this issue Jun 13, 2019
Helcaraxan added a commit to Helcaraxan/gomod that referenced this issue Jun 13, 2019
Helcaraxan added a commit to Helcaraxan/gomod that referenced this issue Jun 13, 2019
@flimzy
Copy link

flimzy commented Jun 13, 2019

@iliapolo I'm not the one to comment on your proposal. I offered a simple, temporary workaround. Emphasis on temporary and workaround.

I leave it to the project maintainers to come up with a better permanent solution.

@iliapolo
Copy link

@flimzy I know, didn't mean to imply otherwise. Still waiting on one of the maintainers to reply.

@LarsOL
Copy link

LarsOL commented Jun 13, 2019

FYI this is fixed from goreleaser

@subosito
Copy link
Author

Just checked, the issue is fixed, as @LarsOL said:

•|• curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh
golangci/golangci-lint info checking GitHub for latest tag
golangci/golangci-lint info found version: 1.17.1 for v1.17.1/darwin/amd64
golangci/golangci-lint info installed ./bin/golangci-lint
•|• echo $?
0
•|• ./bin/golangci-lint --version
golangci-lint has version 1.17.1 built from 4ba2155 on 2019-06-10T09:07:35Z

Madhu-1 added a commit to Madhu-1/ceph-csi that referenced this issue Jul 18, 2019
as golangci/golangci-lint#575
is fixed now.removing the workaround in CI

Signed-off-by: Madhu Rajanna <[email protected]>
Madhu-1 added a commit to Madhu-1/ceph-csi that referenced this issue Jul 18, 2019
as golangci/golangci-lint#575
is fixed now.removing the workaround in CI

Signed-off-by: Madhu Rajanna <[email protected]>
Madhu-1 added a commit to Madhu-1/ceph-csi that referenced this issue Jul 19, 2019
as golangci/golangci-lint#575
is fixed now.removing the workaround in CI

Signed-off-by: Madhu Rajanna <[email protected]>
Madhu-1 added a commit to Madhu-1/ceph-csi that referenced this issue Jul 25, 2019
as golangci/golangci-lint#575
is fixed now.removing the workaround in CI

Signed-off-by: Madhu Rajanna <[email protected]>
mergify bot pushed a commit to ceph/ceph-csi that referenced this issue Jul 25, 2019
as golangci/golangci-lint#575
is fixed now.removing the workaround in CI

Signed-off-by: Madhu Rajanna <[email protected]>
wilmardo pushed a commit to wilmardo/ceph-csi that referenced this issue Jul 29, 2019
as golangci/golangci-lint#575
is fixed now.removing the workaround in CI

Signed-off-by: Madhu Rajanna <[email protected]>
rhcarvalho added a commit to rhcarvalho/sentry-go that referenced this issue Dec 13, 2019
The current recommended installation steps use githubusercontent.com
instead of goreleaser.com. There has been a reported issue in which the
installer code differed between the two sites.
golangci/golangci-lint#575

Additionally, pin to a specific tagged version of the install script to
ensure reproducible installations of the tool.

Use version 1.19.1.

The latest two releases (1.21.0, 1.20.0) have a flaky bug (at least on
macOS) that prevents the linter to run while still exiting with code 0
(success).

```
~/s/sentry-go ❯❯❯ golangci-lint run
WARN [runner] Can't run linter goanalysis_metalinter: assign: failed
prerequisites: [email protected]/getsentry/sentry-go/echo
~/s/sentry-go ❯❯❯ golangci-lint run
WARN [runner] Can't run linter goanalysis_metalinter: interfacer: failed
prerequisites: [email protected]/getsentry/sentry-go/echo
```

See
- golangci/golangci-lint#866
- golangci/golangci-lint#827
rhcarvalho added a commit to rhcarvalho/sentry-go that referenced this issue Dec 13, 2019
The current recommended installation steps use githubusercontent.com
instead of goreleaser.com. There has been a reported issue in which the
installer code differed between the two sites.
golangci/golangci-lint#575

Additionally, pin to a specific tagged version of the install script to
ensure reproducible installations of the tool.

Use version 1.19.1.

The latest two releases (1.21.0, 1.20.0) have a flaky bug (at least on
macOS) that prevents the linter to run while still exiting with code 0
(success).

```
~/s/sentry-go ❯❯❯ golangci-lint run
WARN [runner] Can't run linter goanalysis_metalinter: assign: failed
prerequisites: [email protected]/getsentry/sentry-go/echo
~/s/sentry-go ❯❯❯ golangci-lint run
WARN [runner] Can't run linter goanalysis_metalinter: interfacer: failed
prerequisites: [email protected]/getsentry/sentry-go/echo
```

See
- golangci/golangci-lint#866
- golangci/golangci-lint#827
rhcarvalho added a commit to getsentry/sentry-go that referenced this issue Dec 13, 2019
The current recommended installation steps use githubusercontent.com
instead of goreleaser.com. There has been a reported issue in which the
installer code differed between the two sites.
golangci/golangci-lint#575

Additionally, pin to a specific tagged version of the install script to
ensure reproducible installations of the tool.

Use version 1.19.1.

The latest two releases (1.21.0, 1.20.0) have a flaky bug (at least on
macOS) that prevents the linter to run while still exiting with code 0
(success).

```
~/s/sentry-go ❯❯❯ golangci-lint run
WARN [runner] Can't run linter goanalysis_metalinter: assign: failed
prerequisites: [email protected]/getsentry/sentry-go/echo
~/s/sentry-go ❯❯❯ golangci-lint run
WARN [runner] Can't run linter goanalysis_metalinter: interfacer: failed
prerequisites: [email protected]/getsentry/sentry-go/echo
```

See
- golangci/golangci-lint#866
- golangci/golangci-lint#827
@ldez ldez added the area: install Issue relates to installation or downloading process label Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: install Issue relates to installation or downloading process
Projects
None yet
Development

No branches or pull requests

7 participants