Getting the value of remote version

I’m using the Remote App Versioning feature recently introduced in EAS. It seems reliable and working fine but I would love to know if it’s possible to retrieve the remotely stored version number (ios or Android) via a cli command. My use case would be to use this version identifier to run the sentry-cli and upload source maps but I can imagine it being useful also for other kinds of CI workflows.

Currently I’m running eas-cli/3.9.1 on a managed workflow project.

hi there! it’s possible to fetch this through our graphql api (undocumented): eas-cli/AppVersionQuery.ts at main · expo/eas-cli · GitHub

this is called by eas build:version:sync to pull the version into a local native project.

if you could snap your fingers and get access to this data easily somehow, how would you like that to happen?

1 Like

Thank you @brents ! The graphql path will probably solve my problem!
About the command you mentioned I previously tried to run it and got this message.

> eas build:version:sync -p android

The remote value for the Android versionCode is xx, but it was not synced to the local project. This command has no effect on projects using managed workflow.

In my opinion, it could be a good idea to make eas build:version:sync populate app.json with the version code in managed workflow projects (but I don’t know if it’s doable)

we can’t do that because it’s often dynamic (app.config.js) and we also recommend that the developer remove this field from their app config because it doesn’t accurately represent the state when the version is stored remotely