Merge pull request #619 from geeksville/pr-poelock

Add bin/git-resolve-poetry-lock.sh to resolve merge conficts
This commit is contained in:
Ian McEwen authored and GitHub committed 2024-06-30 09:33:51 -07:00
commit 01674b9803
1 file changed
+19
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -e
# This is a little helper you can use to resolve git merge conflicts in poetry.lock
# with minimal changes vs the requested lib versions
# Based on this article with a good description of best practices:
# https://www.peterbe.com/plog/how-to-resolve-a-git-conflict-in-poetry.lock
echo "Resolving poetry.lock merge conflicts, you'll need to run git commit yourself..."
# Get poetry.lock to look like it does in master
git checkout --theirs poetry.lock
# Rewrite the lock file
poetry lock --no-update
git add poetry.lock
# Update your poetry env to match the new merged lock file
poetry install