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

Add Makefile target for go dep updates #155

Merged
merged 5 commits into from
Jan 31, 2022
Merged

Conversation

ibihim
Copy link
Collaborator

@ibihim ibihim commented Jan 6, 2022

What

Add make target for updating go dependencies.

Why

  • To make it easy to keep the dependencies up to date.
  • To make it part of the release process.

@s-urbaniak
Copy link
Collaborator

let's leverage the make target, and update the godeps here as well.

Also, please add a section in the readme how to update golang dependencies.

Signed-off-by: Krzysztof Ostrowski <kostrows@redhat.com>
Signed-off-by: Krzysztof Ostrowski <kostrows@redhat.com>
Makefile Outdated
.PHONY: update-go-deps
update-go-deps:
@for m in $$(go list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \
go get $$m; \
Copy link
Collaborator

@s-urbaniak s-urbaniak Jan 6, 2022

Choose a reason for hiding this comment

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

i believe we want to go get -d, see https://github.com/prometheus/prometheus/blob/b48a1e9e9bc3575e2f6ef3e7ea8573434288e0bb/Makefile.common#L159-L168

according to go help get:

The -d flag instructs get not to build or install packages. get will only
update go.mod and download source code needed to build packages.

@s-urbaniak s-urbaniak merged commit 816400a into brancz:master Jan 31, 2022
@ibihim ibihim deleted the make-deps branch February 1, 2022 08:30
@ibihim ibihim restored the make-deps branch February 1, 2022 10:54
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

Successfully merging this pull request may close these issues.

None yet

2 participants