Building specific version


(p3lim) #1

I’m attempting to build a specific version of Caddy (any version really, testing this with v0.11.5), running this:

$ go get github.com/mholt/caddy/caddy
$ go get github.com/caddyserver/builds
$ cd $GOPATH/src/github.com/mholt/caddy/caddy
$ git checkout v0.11.5
HEAD is now at 80dfb8b vendor: Update lego; notes for v0.11.5

$ go run build.go
$ caddy --version
Caddy (untracked dev build) (unofficial)

$ git describe --exact-match HEAD
v0.11.5

I target a specific version, which from my understanding, the builds script should understand is an actual version (describing HEAD), but the built binary says “untracked dev version”.
This is not detailed in the build instructions, but it might as well be me not too familiar with Go building and how you use it differently.


(Matt Holt) #2

Run ./caddy -version instead.


(p3lim) #3

Thanks! Odd that it builds two binaries, and the one in Go’s binary path is not the correct one.


(Matt Holt) #4

The one in your PATH is put there with go get, which does not use build.go.