Skip to content

Commit

Permalink
Add conflict auto-resolution attempt for pnpm-lock.yaml file.
Browse files Browse the repository at this point in the history
  • Loading branch information
iva2k committed Jan 10, 2024
1 parent dc1124e commit fbfb628
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions scripts/git-merge_main-to-all-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,20 @@ for TARGET_BRANCH in "${TARGET_BRANCHES[@]}"; do

# Check for merge conflicts
if [ $? -ne 0 ]; then
echo "Merge conflict detected in \"$TARGET_BRANCH\" branch. Please resolve conflicts manually, push changes, and run the script again."
exit 1
echo "Merge conflict detected in \"$TARGET_BRANCH\" branch."
echo " Recreating 'pnpm-lock.yaml' as most likely attempt to resolve conflicts..."
(git checkout HEAD -- pnpm-lock.yaml && pnpm install && git add pnpm-lock.yaml)
echo " DONE Recreating 'pnpm-lock.yaml'."
if git diff --name-only --diff-filter=U | grep -q .; then
echo " There are remaining unresolved Git conflicts:"
git diff --name-only --diff-filter=U
echo " Please resolve any remaining Git conflicts manually, commit and push changes, and run the script again."
exit 1
else
echo "No unresolved Git conflicts found, continuing..."
git commit
fi

fi

# Push the changes to the remote repository
Expand Down

1 comment on commit fbfb628

@vercel
Copy link

@vercel vercel bot commented on fbfb628 Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

svelte-blank-20221125 – ./

svelte-blank-20221125-git-main-iva2k.vercel.app
svelte-blank-20221125.vercel.app
svelte-blank-20221125-iva2k.vercel.app

Please sign in to comment.