diff --git a/.github/scripts/report-stale-patch.sh b/.github/scripts/report-stale-patch.sh index 5d9d5c805b0e..0559e64bb319 100755 --- a/.github/scripts/report-stale-patch.sh +++ b/.github/scripts/report-stale-patch.sh @@ -10,14 +10,30 @@ set -euo pipefail git checkout -- . 2>/dev/null || true # Name the patches that no longer apply, so the issue points at a file rather -# than at a log the reader has to scroll. +# than at a log the reader has to scroll. Variants of one NNNN prefix are +# alternatives (see apply-mirror-patches.sh), so a group is stale only when none +# of its variants apply; the unused variants of a working group are not. shopt -s nullglob stale=() +checked=() for patch in mirror-patches/*.patch; do - if ! git apply --3way --check "$patch" >/dev/null 2>&1; then - stale+=("$patch") + base=$(basename "$patch") + prefix="${base%%-*}" + if [[ " ${checked[*]-} " == *" $prefix "* ]]; then + continue + fi + checked+=("$prefix") + variants=(mirror-patches/"$prefix"-*.patch) + applies=0 + for variant in "${variants[@]}"; do + if git apply --3way --check "$variant" >/dev/null 2>&1; then + applies=1 + fi + git checkout -- . 2>/dev/null || true + done + if [[ "$applies" -eq 0 ]]; then + stale+=("${variants[@]}") fi - git checkout -- . 2>/dev/null || true done if [[ "${#stale[@]}" -eq 0 ]]; then stale=(mirror-patches/*.patch) diff --git a/mirror-patches/0001-linux-deb-rpm-auto-update.patch b/mirror-patches/0001-linux-deb-rpm-auto-update.patch index d5b7167a3254..3f15920859f3 100644 --- a/mirror-patches/0001-linux-deb-rpm-auto-update.patch +++ b/mirror-patches/0001-linux-deb-rpm-auto-update.patch @@ -1,5 +1,5 @@ diff --git a/apps/desktop/src/updates/DesktopUpdates.ts b/apps/desktop/src/updates/DesktopUpdates.ts -index 51584e3c7..ba9252a42 100644 +index c35b52e834..619656fcf3 100644 --- a/apps/desktop/src/updates/DesktopUpdates.ts +++ b/apps/desktop/src/updates/DesktopUpdates.ts @@ -249,6 +249,7 @@ function getAutoUpdateDisabledReason(args: { diff --git a/mirror-patches/0002-linux-deb-rpm-package-metadata.patch b/mirror-patches/0002-linux-deb-rpm-package-metadata.patch index a2a45f758efa..4da86a449c03 100644 --- a/mirror-patches/0002-linux-deb-rpm-package-metadata.patch +++ b/mirror-patches/0002-linux-deb-rpm-package-metadata.patch @@ -1,5 +1,5 @@ diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts -index cb47e40b8..17e513520 100644 +index 02e514d83f..fd76eebbda 100644 --- a/scripts/build-desktop-artifact.ts +++ b/scripts/build-desktop-artifact.ts @@ -930,6 +930,8 @@ interface StagePackageJson { @@ -65,7 +65,7 @@ index cb47e40b8..17e513520 100644 } if (platform === "win") { -@@ -3651,7 +3690,9 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( +@@ -3642,7 +3681,9 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( private: true, packageManager: rootPackageJson.packageManager, description: "T3 Code desktop build", diff --git a/mirror-patches/0003-linux-appstream-metainfo.patch b/mirror-patches/0003-linux-appstream-metainfo.patch index e2fad353f5ac..b0c46f83a27f 100644 --- a/mirror-patches/0003-linux-appstream-metainfo.patch +++ b/mirror-patches/0003-linux-appstream-metainfo.patch @@ -1,8 +1,8 @@ diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts -index 848c5806b..95e3f8deb 100644 +index 02e514d83f..566e80253d 100644 --- a/scripts/build-desktop-artifact.ts +++ b/scripts/build-desktop-artifact.ts -@@ -2620,6 +2620,46 @@ export function resolveDesktopProductName(version: string): string { +@@ -2618,6 +2618,46 @@ export function resolveDesktopProductName(version: string): string { : (desktopPackageJson.productName ?? "T3 Code"); } @@ -49,7 +49,7 @@ index 848c5806b..95e3f8deb 100644 export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( platform: typeof BuildPlatform.Type, target: string, -@@ -2638,6 +2678,7 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( +@@ -2636,6 +2676,7 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( // source file was never written fails the electron-builder step. wslRuntimeBundled = false, arch?: typeof BuildArch.Type, @@ -57,7 +57,7 @@ index 848c5806b..95e3f8deb 100644 ) { const buildConfig: Record = { appId: DESKTOP_APP_ID, -@@ -2786,6 +2827,20 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( +@@ -2774,6 +2815,20 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( buildConfig.win = winConfig; } @@ -78,7 +78,7 @@ index 848c5806b..95e3f8deb 100644 return buildConfig; }); -@@ -3605,6 +3660,19 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( +@@ -3584,6 +3639,19 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( const stageProdResourcesDir = path.join(stageAppDir, "apps/desktop/prod-resources"); yield* fs.copy(stageResourcesDir, stageProdResourcesDir); @@ -98,7 +98,7 @@ index 848c5806b..95e3f8deb 100644 const configuredMacPasskeySigning = options.platform === "mac" && options.signed ? yield* Effect.try({ -@@ -3656,7 +3724,7 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( +@@ -3635,7 +3703,7 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( ? path.join(stageAppDir, WINDOWS_SERVER_RESOURCE_SOURCE_DIR, WINDOWS_SERVER_ASAR_RESOURCE) : undefined; const stagePackageJson: StagePackageJson = { @@ -107,7 +107,7 @@ index 848c5806b..95e3f8deb 100644 version: appVersion, buildVersion: appVersion, t3codeCommitHash: commitHash, -@@ -3682,6 +3750,7 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( +@@ -3659,6 +3727,7 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( : undefined, bundlesWslRuntime({ platform: options.platform, runtimeArchivePath: options.wslRuntime }), options.arch, diff --git a/mirror-patches/0006-mirror-release-changelog.patch b/mirror-patches/0006-mirror-release-changelog.patch index 4ae0babcf9e2..2b3d7dd68594 100644 --- a/mirror-patches/0006-mirror-release-changelog.patch +++ b/mirror-patches/0006-mirror-release-changelog.patch @@ -95,7 +95,7 @@ index 3cab5f15e4..bf5b3a5f08 100644 ]; }); diff --git a/apps/web/src/components/sidebar/SidebarUpdateReleaseNotes.tsx b/apps/web/src/components/sidebar/SidebarUpdateReleaseNotes.tsx -index 89204d1bd8..3e6d16a1d6 100644 +index ef9713fd73..693102178d 100644 --- a/apps/web/src/components/sidebar/SidebarUpdateReleaseNotes.tsx +++ b/apps/web/src/components/sidebar/SidebarUpdateReleaseNotes.tsx @@ -1,6 +1,7 @@ @@ -151,7 +151,7 @@ index 89204d1bd8..3e6d16a1d6 100644 ? "View release on GitHub" @@ -87,16 +115,28 @@ export function SidebarUpdateReleaseNotes({
- {index > 0 && } + {index > 0 && }
-

- {index === 0 ? "What's changed" : `Changes in ${releaseNote.version}`}