From 761f315a602060f2c06ba9b85b77654a643870e5 Mon Sep 17 00:00:00 2001 From: lafay <2021211506@stu.hit.edu.cn> Date: Sun, 21 Jun 2026 17:36:17 +0800 Subject: [PATCH] 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. --- .gitea/workflows/build.yml | 4 ++++ app.config.js | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 73e2411..972817e 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -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 diff --git a/app.config.js b/app.config.js index a2ee39d..217ab7b 100644 --- a/app.config.js +++ b/app.config.js @@ -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,