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 Answer 1

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.

5
  • even after checking out horizon-v0.16.0 (using git checkout tags/horizon-v0.16.0) and starting , still getting version devel
    – sweta
    Commented Feb 25, 2019 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
    Commented Feb 25, 2019 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
    Commented Feb 25, 2019 at 10:46
  • How do we set version for core?
    – sweta
    Commented Feb 25, 2019 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
    Commented Feb 25, 2019 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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