Skip to content

Commit 1180456

Browse files
committed
run gro sync only if the branch changes
1 parent 3cf5142 commit 1180456

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

.changeset/cool-spiders-travel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@ryanatkn/fuz_gitops': patch
3+
---
4+
5+
run `gro sync` only if the branch changes

src/lib/local_repo.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ export const load_local_repo = async (
5959
);
6060
}
6161
await git_checkout(repo_config.branch, {cwd: repo_dir});
62-
}
6362

64-
// Sync the repo so deps are installed and generated files are up-to-date.
65-
await spawn_cli('gro', ['sync'], log, {cwd: resolved_local_repo.repo_dir});
63+
// TODO probably allow opt-in syncing, problem is it's very slow to do in the normal case
64+
// Sync the repo so deps are installed and generated files are up-to-date.
65+
await spawn_cli('gro', ['sync'], log, {cwd: resolved_local_repo.repo_dir});
66+
}
6667

6768
const parsed_sveltekit_config = await init_sveltekit_config(repo_dir);
6869
const lib_path = join(repo_dir, parsed_sveltekit_config.lib_path);

0 commit comments

Comments
 (0)