Move chown -R into sync target so it always runs
rsync --chown only applies to transferred files; a separate chown -R ensures ownership is correct even when no files needed updating. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
4
Makefile
4
Makefile
@@ -12,9 +12,9 @@ RSYNC_EXCLUDES := \
|
||||
|
||||
# Full deployment: sync files, fix ownership, install dependencies
|
||||
deploy: sync
|
||||
sudo chown -R $(OWNER) $(DEST)
|
||||
sudo -u $(OWNER_USER) npm ci --prefix $(DEST)
|
||||
|
||||
# Copy files only — useful for quick updates when dependencies haven't changed
|
||||
# Copy files and fix ownership — useful for quick updates when dependencies haven't changed
|
||||
sync:
|
||||
sudo rsync -a --delete --chown=$(OWNER) $(RSYNC_EXCLUDES) ./ $(DEST)/
|
||||
sudo chown -R $(OWNER) $(DEST)
|
||||
|
||||
Reference in New Issue
Block a user