Skip to content

Commit 4d39163

Browse files
committed
ci(sync-patches): auto-resolve all version file conflicts by pattern
Replace hardcoded file list with pattern match on package.json, pyproject.toml, and version.json so CLI and SDK version conflicts are auto-resolved too.
1 parent 339acc4 commit 4d39163

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/sync-patches.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,16 @@ jobs:
7979
else
8080
echo "Merge conflict — attempting auto-resolution of release artifacts..."
8181
82-
# Auto-resolve expected conflicts: package.json versions.
82+
# Auto-resolve expected conflicts: version files managed by semantic-release.
8383
# For these files, keep main's version (semantic-release manages them per-branch).
84-
for f in packages/superdoc/package.json packages/esign/package.json packages/template-builder/package.json apps/vscode-ext/package.json; do
85-
if git diff --name-only --diff-filter=U | grep -qF "$f"; then
86-
echo " Auto-resolving $f (keeping main's version)"
87-
git checkout --ours "$f"
88-
git add "$f"
89-
fi
84+
git diff --name-only --diff-filter=U | while read -r f; do
85+
case "$f" in
86+
*/package.json|*/pyproject.toml|*/version.json)
87+
echo " Auto-resolving $f (keeping main's version)"
88+
git checkout --ours "$f"
89+
git add "$f"
90+
;;
91+
esac
9092
done
9193
9294
# Check if all conflicts are resolved

0 commit comments

Comments
 (0)