-
Notifications
You must be signed in to change notification settings - Fork 66
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
Clean up build stuff #77
Conversation
|
||
bin: | ||
@mkdir ./bin | ||
bin/go-md2man: go.mod go.sum md2man/* *.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.
Can't comment on the lines above, but if we're cleaning up;
LINTER_BIN
looks unused- perhaps change
GO111MODULE
default toauto
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 this needs go modules. We need to make sure its own regardless of if we are in gopath or not.
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.
Hm... looks like it's ignoring the vendor
directory.
rm -rf bin && docker run --rm -e GO111MODULE=auto -e CGO_ENABLED=0 -v $(pwd):/app -w /app golang:1.17 sh -c 'go build -o bin/go-md2man && bin/go-md2man --foobar'
go: downloading github.com/russross/blackfriday/v2 v2.1.0
flag provided but not defined: -foobar
rm -rf bin && docker run --rm -e GO111MODULE=on -e CGO_ENABLED=0 -v $(pwd):/app -w /app golang:1.17 sh -c 'go build -o bin/go-md2man && bin/go-md2man --foobar'
go: downloading github.com/russross/blackfriday/v2 v2.1.0
flag provided but not defined: -foobar
rm -rf bin && docker run --rm -e GO111MODULE=auto -e CGO_ENABLED=0 -v $(pwd):/go/src/github.com/cpuguy83/go-md2man -w /go/src/github.com/cpuguy83/go-md2man golang:1.17 bash -c 'go build -o bin/go-md2man && bin/go-md2man --foobar'
go: downloading github.com/russross/blackfriday/v2 v2.1.0
flag provided but not defined: -foobar
rm -rf bin && docker run --rm -e GO111MODULE=on -e CGO_ENABLED=0 -v $(pwd):/go/src/github.com/cpuguy83/go-md2man -w /go/src/github.com/cpuguy83/go-md2man golang:1.17 bash -c 'go build -o bin/go-md2man && bin/go-md2man --foobar'
go: downloading github.com/russross/blackfriday/v2 v2.1.0
flag provided but not defined: -foobar
So looks like all permutations ignore vendor
and will download the module. Disabling networking shows that's indeed the case;
rm -rf bin && docker run --rm -e GO111MODULE=on --network=none -e CGO_ENABLED=0 -v $(pwd):/go/src/github.com/cpuguy83/go-md2man -w /go/src/github.com/cpuguy83/go-md2man golang:1.17 bash -c 'go build -o bin/go-md2man && bin/go-md2man --foobar'
go: github.com/russross/blackfriday/[email protected]: Get "https://proxy.golang.org/github.com/russross/blackfriday/v2/@v/v2.1.0.mod": dial tcp: lookup proxy.golang.org on 192.168.65.5:53: dial udp 192.168.65.5:53: connect: network is unreachable
go: downloading github.com/russross/blackfriday/v2 v2.1.0
go: github.com/russross/blackfriday/[email protected]: Get "https://proxy.golang.org/github.com/russross/blackfriday/v2/@v/v2.1.0.mod": dial tcp: lookup proxy.golang.org on 192.168.65.5:53: dial udp 192.168.65.5:53: connect: network is unreachable
The only option that works is to use -mod=vendor
:
rm -rf bin && docker run --rm -e GO111MODULE=on --network=none -e CGO_ENABLED=0 -v $(pwd):/go/src/github.com/cpuguy83/go-md2man -w /go/src/github.com/cpuguy83/go-md2man golang:1.17 bash -c 'go build -mod=vendor -o bin/go-md2man && bin/go-md2man --foobar'
flag provided but not defined: -foobar
Usage of bin/go-md2man:
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.
Right yes, vendor is leftover from go mod transition...
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.
Removed vendor dir.
7b5639a
to
68850f8
Compare
Added go1.11 to the test matrix. |
d81d36b
to
090b299
Compare
1. Uses modern go in Dockerfile 2. Fix `make build` pre-reqs 3. Remove interim BUILDFLAGS handling Signed-off-by: Brian Goff <[email protected]>
Signed-off-by: Brian Goff <[email protected]>
Signed-off-by: Brian Goff <[email protected]>
Signed-off-by: Brian Goff <[email protected]>
090b299
to
6bf89fd
Compare
make build
pre-reqs