Reference for current version of app

Looking for a way to reference the current version within components. Would like to display the version number as text within apps. For example, {{current_release.liveVersion}}

2 Likes

+1 from me. It's nice to display the version number in apps that are updated frequently, and it's easy to forget to manually update the version number in the text component each time. It's surprising to me that this is not exposed in state globals.

Hi @Schteevynn

I think you can accomplish what you're looking to do with pageTag :blush:

Just keep in mind that it'll always evaluate to "latest" in edit mode.

Hope it solves your case! We have a feature request to make this more discoverable (and re-name it to something more expected)

Hey @Tess,

Thanks for the tip, but this does not give us the version number. Like 1.07

:grinning:

Patrick

@Tess

Aah, now I see why it didn't appear useful at first! Not only does it sub in "latest" in edit mode, it also subs in "latest" when toggling into preview mode from edit mode. So it's not obvious. Buuut it does actually display the numbers when you run the app like an end user, like you said!

If you open up the Debug/State window when in "regular" app-run mode (which I can't say I've ever done before, until just now), there are the numbers after all. Thanks!

As you can see I have also been making use of retoolContext.environment

Screenshot 2023-07-31 at 2.13.52 PM

Screenshot 2023-07-31 at 2.21.51 PM

2 Likes

Yes!! Works also here like @Schteevynn says! Thanks!

:grinning:

Patrick

1 Like