Skip to content

Commit 4a70e88

Browse files
committed
fix pixi issues with merge
1 parent 9cc8cc3 commit 4a70e88

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

scripts/rename_project.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
mv python_template "$1"
44

55
# change project name in all files
6-
find . \( -type d -name .git -prune \) -o \( -type f -not -name 'tasks.json' -not -name 'update_from_template.sh' \) -print0 | xargs -0 sed -i "s/python_template/$1/g"
6+
find . \( -type d -name .git -prune \) -o \( -type f -not -name 'tasks.json' -not -name 'update_from_template.sh' -not -name 'pixi.lock' \) -print0 | xargs -0 sed -i "s/python_template/$1/g"
7+
8+
# regenerate lockfile to match renamed project
9+
pixi update
710

811
# author name
912
if [ -n "$2" ]; then

scripts/update_from_template.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ git fetch --all
66
git checkout main && git pull origin main
77
git checkout -B feature/update_from_template; git pull
88
git merge template/main --allow-unrelated-histories -m 'feat: pull changes from remote template'
9-
git checkout --ours pixi.lock; git add pixi.lock
9+
git checkout --ours pixi.lock
10+
11+
# regenerate lockfile to match merged pyproject.toml
12+
pixi update
13+
git add pixi.lock
14+
git diff --cached --quiet || git commit -m 'chore: update pixi.lock after template merge'
15+
1016
git remote remove template
1117
git push --set-upstream origin feature/update_from_template
1218
git checkout main

0 commit comments

Comments
 (0)