eas-cli icon indicating copy to clipboard operation
eas-cli copied to clipboard

[Suggestion] Add Timestamp as native build version

Open Splanis opened this issue 11 months ago • 3 comments

Migrating from AppCenter to EAS, we are missing a feature. In our project, we used AppCenter's option to set the native build number to a timestamp (e.g., 1738862592), and we have already released our app. However, Google Play does not allow releasing a version with a lower build number (e.g., we cannot reset it to 1 and use auto-increment).

I attempted a solution by running:

eas-build-pre-install: set-env EXPO_PUBLIC_BUILD_NUMBER "$(date +%s)"

And added process.env.EXPO_PUBLIC_BUILD_NUMBER to app.config for the version, with appVersionSource: local

At first, it seemed to work, but I noticed that in some builds, the versionCode in EAS was showing as "1" before running eas-build-pre-install or reading app.config.

Would it make sense to introduce an option like this? appVersionSource: remote | local | timestamp

Thanks! :)

Splanis avatar Feb 06 '25 17:02 Splanis