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

fix(mkreleaselog): make robust against running in different working directories #7310

Merged
merged 1 commit into from
May 13, 2020

Conversation

Stebalien
Copy link
Member

  1. Cd into the repo root before running go list.
  2. Make sure the repo lives in the GOPATH.

fixes #7296 (comment)

…irectories

1. Cd into the repo root before running `go list`.
2. Make sure the repo lives in the GOPATH.
@Stebalien Stebalien requested a review from ribasushi May 13, 2020 05:32
Copy link
Contributor

@ribasushi ribasushi left a comment

Choose a reason for hiding this comment

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

This works too... though... it requires knowing what GOPATH is. Note that I was using "default GOPATH", when I wrote the patch/did the testing. I assume this is the case for most newcomers to go, post-modules, thus the "just go get it" worked for me:

admin:~/devel/go-ipfs$ env | grep GO
[@ Wed 06:00:36.432]
[$?==1  /    0.010s]
admin:~/devel/go-ipfs$ go env | grep PATH
GOPATH="/Users/admin/go"
[@ Wed 06:00:42.708]
[$?==0  /    0.127s]

@Stebalien
Copy link
Member Author

https://github.com/ipfs/go-ipfs/blob/8e7cead9af8fc0d8886e7b601275e6061a526dd6/bin/mkreleaselog#L5

(go env GOPATH will print out the default if the environment variable is unset)

@Stebalien Stebalien merged commit f8306e2 into master May 13, 2020
@ribasushi
Copy link
Contributor

@Stebalien I misphrased. What I meant is that the user needs to know what GOPATH is, and most newcomers to go post-modules do not really understand all that (I still don't... fully).

Thus this is a bit cryptic:
https://github.com/ipfs/go-ipfs/blob/048c1c37b3811c1568f7a6f12ae07d2ba24935ed/bin/mkreleaselog#L167

Ok, it requires this, how do I fix it? :) In any case: this is maint tooling, not that important, just wanted to clarify what I meant.

@Stebalien
Copy link
Member Author

Ah, got it. Yeah, I'm tempted to say "if you're messing with this script, you probably know what GOPATH is".

@Stebalien Stebalien mentioned this pull request May 26, 2020
77 tasks
@hacdias hacdias deleted the fix/mkrelease-cwd branch May 9, 2023 10:58
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