expo / expo/eas-cli

[Suggestion] Add Timestamp as native build version

Open
#2,889 3 comments 0 reactions 0 assignees View on GitHub
eas build enhancement needs review
Dominant language
TypeScript
Stars
1.4k
Forks
236
Avg merge
3d 1h
Merged PRs (30d)
91

Description

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:

```js
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! :)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.