File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 3434 BRANCH_NAME="sync-upstream-$(date +%Y%m%d-%H%M%S)"
3535
3636 git checkout -b $BRANCH_NAME
37- git merge microsoft/winui3/main --no-edit
3837
39- # Only push and create PR if merge added commits
38+ if ! git merge microsoft/winui3/main --no-edit; then
39+ echo "Merge conflicts detected"
40+
41+ if git diff --name-only --diff-filter=U | grep -q "src/eng/Version.Details.xml"; then
42+ git checkout --theirs src/eng/Version.Details.xml
43+ git add src/eng/Version.Details.xml
44+ fi
45+
46+ if git diff --name-only --diff-filter=U | grep -q .; then
47+ echo "Non-version conflicts detected - needs manual review"
48+ git merge --abort
49+ exit 1
50+ fi
51+
52+ git commit -m "Resolved Version.Details.xml conflict with upstream version"
53+ fi
54+
4055 if git diff --quiet origin/main; then
4156 echo "Already up to date with upstream"
4257 exit 0
5368 echo "Created PR: $PR_URL"
5469
5570 gh pr merge "$PR_URL" --auto --squash
56- echo "Auto-merge enabled"
71+ echo "Auto-merge enabled"
You can’t perform that action at this time.
0 commit comments