diff --git a/.circleci/config.yml b/.circleci/config.yml index 030672511..ec7f53767 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -125,7 +125,15 @@ commands: export LINUX_ARTIFACT=$WORKING_DIR/<< parameters.package >>-linux-amd64 export APP_VERSION=$(git describe --tag) + + if [ -z "$APP_VERSION" ]; then + APP_VERSION="latest" + fi + export APP_LDFLAGS="-X github.com/pastelnetwork/gonode/common/version.version=$APP_VERSION" + echo "APP_VERSION=$APP_VERSION" + echo "APP_LDFLAGS=$APP_LDFLAGS" + cd ~/go/src/github.com/pastelnetwork/gonode xgo -go go-1.21.1 --targets=<< parameters.targets >> -ldflags "$APP_LDFLAGS" github.com/pastelnetwork/gonode/<< parameters.package >> diff --git a/supernode/main.go b/supernode/main.go index 8ab9369a8..59b24e107 100644 --- a/supernode/main.go +++ b/supernode/main.go @@ -21,6 +21,7 @@ func main() { defer errors.Recover(log.FatalAndExit) app := cmd.NewApp() + app.HideVersion = false err := app.Run(os.Args) log.FatalAndExit(err) diff --git a/walletnode/main.go b/walletnode/main.go index fb746d357..2e9c0f2ae 100644 --- a/walletnode/main.go +++ b/walletnode/main.go @@ -86,6 +86,7 @@ func main() { //configuration in here, app.Run will actually run NewApp's runApp function. app := cmd.NewApp() + app.HideVersion = false err := app.Run(os.Args) log.FatalAndExit(err)