I am trying to build horizon in local by following https://github.com/stellar/go/blob/master/services/horizon/internal/docs/admin.md
The setup is complete. When I do horizon version it say devel. Why?
Why not the latest 10.2.0?
I am trying to build horizon in local by following https://github.com/stellar/go/blob/master/services/horizon/internal/docs/admin.md
The setup is complete. When I do horizon version it say devel. Why?
Why not the latest 10.2.0?
The version string can be set when building the app, but it's not determined automatically and it defaults to devel
. SDF surely has some kind of build tool/script that performs that for their release builds.
If you want to set the version string for your own builds, here is how to specify the build params:
root@stellar2:~# go build -ldflags "-X github.com/stellar/go/support/app.version=MyOwn-0.15.3" github.com/stellar/go/services/horizon
root@stellar2:~# ./horizon version
MyOwn-0.15.3
root@stellar2:~#
If you checkout master you'll in fact have the latest development version, if you want a specific release you have to check that out first git checkout tags/horizon-v0.15.3
.
go install -ldflags "-X github.com/stellar/go/support/app.version=MyOwn-0.15.3
in a single step (go build=compile and save binary in curent folder; go install=compile and save binary in $GOPATH/bin )