From 6df79d32d9f933f7f83b10ad5c2bbf43fc14f50c Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Sun, 7 Sep 2025 23:06:43 +0200 Subject: [PATCH] Change sync order --- bin/sync-repo | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bin/sync-repo b/bin/sync-repo index 15dab4e..e653644 100755 --- a/bin/sync-repo +++ b/bin/sync-repo @@ -56,4 +56,17 @@ if [[ "$REMOTE" == "$DEFAULT_REMOTE" ]] && [[ "$SKIP_PROD_CHECK" != true ]]; the fi print_info "Syncing to: $REMOTE" -rclone sync "$DIRECTORY" "$REMOTE/$(basename $DIRECTORY)" --checksum --progress --copy-links --delete-after -v + +# First sync packages (excluding database files to ensure packages are uploaded first) +print_info "Syncing packages..." +rclone sync "$DIRECTORY" "$REMOTE/$(basename $DIRECTORY)" \ + --exclude "omarchy.db*" \ + --exclude "omarchy.files*" \ + --checksum --progress --copy-links --delete-after -v + +# Then sync database files last to ensure repository integrity +print_info "Updating repository database..." +rclone copy "$DIRECTORY"/omarchy.* "$REMOTE/$(basename $DIRECTORY)/" \ + --checksum --progress -v + +print_success "Sync complete!"