build(updates): enable full git history and use semantic version for runtimeVersion
Enable fetch-depth: 0 in checkout steps to support commit counting. Switch runtimeVersion from buildNumber to appJson.expo.version so that builds with the same semantic version share OTA update channels, while versionCode/buildNumber continue using commit count for app store monotonic versioning.
This commit is contained in:
@@ -36,6 +36,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v4
|
||||
@@ -108,6 +110,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
|
||||
@@ -66,9 +66,10 @@ const filteredPlugins = isWeb
|
||||
module.exports = {
|
||||
...expo,
|
||||
name: isDevVariant ? `${expo.name} Dev` : expo.name,
|
||||
// runtimeVersion 用 build number(commit count + 偏移):单调递增、纯数字、与 version (语义版本) 解耦
|
||||
// 字符串形式,等价于 policy: 'custom'
|
||||
runtimeVersion: buildNumber,
|
||||
// runtimeVersion 用语义版本(expo.version):同一版本号的所有 build 共享 OTA 通道,
|
||||
// 改原生代码/配置后应升级 version 来切换通道。
|
||||
// versionCode / buildNumber 仍用 commit count + 偏移,保证应用商店版本号单调递增。
|
||||
runtimeVersion: appJson.expo.version,
|
||||
updates: {
|
||||
...(expo.updates || {}),
|
||||
url: isDevVariant ? devUpdatesUrl : releaseUpdatesUrl,
|
||||
|
||||
Reference in New Issue
Block a user