mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
android: check version sync for mixed release changes
This commit is contained in:
@@ -45,6 +45,10 @@ const TARGETED_CORE_LINT_PATH_LIMIT = 8;
|
||||
const LINTABLE_CORE_PATH_RE = /^(?:src|ui|packages)\/.+\.[cm]?[jt]sx?$/u;
|
||||
const CORE_LINT_OPTIMIZATION_NEUTRAL_PATH_RE =
|
||||
/^(?:scripts|test\/scripts)\/|^\.github\/workflows\/ci\.yml$/u;
|
||||
const ANDROID_VERSION_SYNC_PATHS = new Set([
|
||||
"apps/android/Config/Version.properties",
|
||||
"apps/android/version.json",
|
||||
]);
|
||||
let corepackPnpmShimDir;
|
||||
let corepackPnpmShimCleanupRegistered = false;
|
||||
|
||||
@@ -65,6 +69,12 @@ function isTruthyEnvFlag(value) {
|
||||
return normalized !== "" && normalized !== "0" && normalized !== "false" && normalized !== "no";
|
||||
}
|
||||
|
||||
function hasAndroidVersionSyncPath(paths) {
|
||||
return paths.some((changedPath) =>
|
||||
ANDROID_VERSION_SYNC_PATHS.has(normalizeChangedPath(changedPath)),
|
||||
);
|
||||
}
|
||||
|
||||
function executableExistsOnPath(command, env = process.env) {
|
||||
const pathValue = env.PATH ?? env.Path ?? "";
|
||||
const pathExts =
|
||||
@@ -260,6 +270,7 @@ export function createChangedCheckPlan(result, options = {}) {
|
||||
|
||||
const lanes = result.lanes;
|
||||
const runAll = lanes.all;
|
||||
const shouldRunAndroidVersionSync = hasAndroidVersionSyncPath(result.paths);
|
||||
|
||||
if (lanes.releaseMetadata) {
|
||||
add("release metadata guard", [
|
||||
@@ -280,6 +291,10 @@ export function createChangedCheckPlan(result, options = {}) {
|
||||
};
|
||||
}
|
||||
|
||||
if (shouldRunAndroidVersionSync) {
|
||||
add("Android version sync", ["android:version:check"]);
|
||||
}
|
||||
|
||||
if (runAll) {
|
||||
add("database-first legacy-store guard", ["check:database-first-legacy-stores"]);
|
||||
add("media download helper guard", ["check:media-download-helpers"]);
|
||||
|
||||
Reference in New Issue
Block a user