-
Notifications
You must be signed in to change notification settings - Fork 23
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
Install buf with go #439
Install buf with go #439
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this!! a few minor comments but overall excited to see the positive iteration here!
@@ -49,8 +49,5 @@ jobs: | |||
with: | |||
submodules: recursive | |||
|
|||
- name: Install buf | |||
uses: bufbuild/buf-setup-action@v1.36.0 | |||
|
|||
- name: Run E2E Tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm my understanding, this actually wasn't being used anymore here, since we removed the buf usage from the build script, right?
go.mod
Outdated
@@ -86,19 +86,19 @@ require ( | |||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | |||
github.com/pelletier/go-toml/v2 v2.0.8 // indirect | |||
github.com/rivo/uniseg v0.2.0 // indirect | |||
github.com/rogpeppe/go-internal v1.10.0 // indirect | |||
github.com/rogpeppe/go-internal v1.12.0 // indirect | |||
github.com/russross/blackfriday/v2 v2.1.0 // indirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused why there are any go.{mod,sum}
changes in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, not sure what I did lol
## ensure the correct version of "buf" is installed | ||
BUF_VERSION='1.36.0' | ||
if [[ $(buf --version | cut -f2 -d' ') != "${BUF_VERSION}" ]]; then | ||
echo "could not find buf ${BUF_VERSION}, is it installed + in PATH?" | ||
exit 255 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should still keep this no? Otherwise calling this script on its own has no guarantee that the code is generated using the expected version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just added an install step here as well, which is basically a no-op if it's already there.
e546abc
to
ba83590
Compare
Why this should be merged
We currently have an issue where the
buf
version needs to be updated in multiple locations, and it is tricky for users to install the correct version.This PR creates a single source of truth, and removed the need for the install step in the github workflows.