Auto-discard package-lock.json changes before git pull
The package-lock.json changes when npm install runs on different platforms/npm versions. Since deploy.sh runs npm install anyway, discard local changes to this file before pulling to avoid conflicts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e06dd414c9
commit
cc2c68bb02
1 changed files with 2 additions and 0 deletions
|
|
@ -86,6 +86,8 @@ echo ""
|
|||
echo "[1/6] Updating code..."
|
||||
if [ -d .git ]; then
|
||||
if git remote -v | grep -q origin; then
|
||||
# Discard local changes to package-lock.json (regenerated by npm install anyway)
|
||||
git checkout -- frontend/package-lock.json 2>/dev/null || true
|
||||
git pull || echo "Warning: git pull failed, continuing with local code"
|
||||
else
|
||||
echo " No remote configured, skipping git pull"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue