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

tasks install:mockgen and install:golangci-lint are installing specific version for all my machine #154

Closed
ccoVeille opened this issue Jun 8, 2024 · 7 comments

Comments

@ccoVeille
Copy link
Contributor

If I have golang 1.59.0, or a custom version locally

the code will nuke it as it would install the version needed by your tool, which is the 1.56.0 for now

same for mockgen

kod/Taskfile.yml

Lines 78 to 92 in 795c83b

install:mockgen:
vars:
VERSION: cat go.mod|grep go.uber.org/mock |awk -F ' ' '{print $2}'
status:
- go version -m $GOPATH/bin/mockgen | grep go.uber.org/mock | grep {{.VERSION}}
cmd: |
go install go.uber.org/mock/mockgen@{{.VERSION}}
install:golangci-lint:
vars:
VERSION: v1.56.2
status:
- go version -m $GOPATH/bin/golangci-lint | grep github.com/golangci/golangci-lint | grep {{.VERSION}}
cmd: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@{{.VERSION}}

@sysulq
Copy link
Contributor

sysulq commented Jun 11, 2024

fixed in #155

@sysulq sysulq closed this as completed Jun 11, 2024
@ccoVeille
Copy link
Contributor Author

It's not completed.

The fix I made was there to check the binary presence before calling it.

The issue described here differs.

If I have golangci-lint 1.59 (or 1.52), launching task test will reinstall the version you expect for

The check should be (and it's not obvious) to validate the version installed is at least tge one you expect

Please reopen

@sysulq
Copy link
Contributor

sysulq commented Jun 11, 2024

Alright, reopened.

@sysulq sysulq reopened this Jun 11, 2024
@ccoVeille
Copy link
Contributor Author

Maybe it's something that could be solved by using the technique used here

https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/blob/master/Taskfile.yaml#L73

By defining a local GOBIN folder you would be able to install and use the version you expect from golangci-lint and mockery

@sysulq
Copy link
Contributor

sysulq commented Jun 12, 2024

Maybe it's something that could be solved by using the technique used here

https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/blob/master/Taskfile.yaml#L73

By defining a local GOBIN folder you would be able to install and use the version you expect from golangci-lint and mockery

Nice point, We can do it like this.

@sysulq
Copy link
Contributor

sysulq commented Jun 17, 2024

fixed in latest commit.

@sysulq sysulq closed this as completed Jun 17, 2024
@ccoVeille
Copy link
Contributor Author

Fixed in 0e89fac and fbba16c

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

No branches or pull requests

2 participants