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?

1

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.

  • even after checking out horizon-v0.16.0 (using git checkout tags/horizon-v0.16.0) and starting , still getting version devel – sweta Feb 25 at 10:06
  • Also to build I am using following command : go install github.com/stellar/go/services/horizon. I executed the command given by u " go build -ldflags "-X github.com/stellar/go/support/app.version=MyOwn-0.15.3" github.com/stellar/go/services/horizon" before the go install but still getting the version as devel – sweta Feb 25 at 10:28
  • 1) the version is not set in the repository at all, it is only set when building 2) do 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 ) – sui Feb 25 at 10:46
  • How do we set version for core? – sweta Feb 25 at 11:21
  • the stellar-core make script determines it automatically from the git status (it's then replaced in src/main/StellarCoreVersion.cpp.in) – sui Feb 25 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.