-
Notifications
You must be signed in to change notification settings - Fork 41
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
x509: update go-generator #87
base: master
Are you sure you want to change the base?
Conversation
aerth
commented
Oct 8, 2018
- Fixes build on FreeBSD
- simplifies install.sh
- removes bash dependency (from this package at least)
da3b8e5
to
5050845
Compare
Thanks for the PR. I think the Travis failure is safe to ignore; it's due to upstream gometalinter recently adding a new linter that we haven't yet dealt with. Just to be safe, I'll hold off on merging this until a fix for the Travis fix is merged in case there's another issue Travis found that I missed while skimming the output. |
NEW_PACKAGE="${NEW_PACKAGE//\//\\/}" | ||
sed -i "s/${OLD_PACKAGE}/${NEW_PACKAGE}/g" ./*.go ${GOPATH}/src/vendor/golang.org/x/crypto/cryptobyte/*.go | ||
#!/bin/sh | ||
set -e |
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.
Am I correct in inferring that the set -u
, set -o pipefail
, and shopt -s failglob
were removed for compatibility with sh
? I'm honestly not sure how I feel about this change; those options are useful from a safety perspective. @hlandau what do you think about this?
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.
Yes and, well, theres no piping going on so theres no need for pipefail
x509/install.sh
Outdated
sed -i "s/${OLD_PACKAGE}/${NEW_PACKAGE}/g" ./*.go ${GOPATH}/src/vendor/golang.org/x/crypto/cryptobyte/*.go | ||
#!/bin/sh | ||
set -e | ||
gopath="$(go env GOROOT)" |
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 prefer that this variable be called goroot
rather than gopath
, since gopath
means something else in Go.
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.
was leftover from testing, thanks for pointing that out!
x509/install.sh
Outdated
test -d $gopath | ||
test -d $x509path | ||
cp -av $x509path/testdata . | ||
cp -v $x509path/*.* . |
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.
Why leave out the -a
here? And why two cp
commands here? Is the single cp
in the original broken in some way?
cp -av $x509path/testdata . | ||
cp -v $x509path/*.* . | ||
rm x509_test.go | ||
sed -i.bak 's/golang_org/golang.org/g' x509.go |
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.
It looks like you've removed the copying of the cryptobyte
package... is that copy actually unnecessary now? I seem to remember it being required when I was porting to Go 1.10.x, is that no longer the case?
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.
no longer necessary it seems (go 1.11.1 here)
The |