Skip to content

Commit 3cf5142

Browse files
committed
sync at start of gro gitops with optional --no-sync arg
1 parent 1a17207 commit 3cf5142

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

.changeset/chatty-penguins-mix.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+
sync at start of `gro gitops` with optional `--no-sync` arg

src/lib/gitops.task.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export const Args = z
2828
.string({description: 'path to the directory for the generated files, defaults to $routes/'})
2929
.optional(),
3030
download: z.boolean({description: 'download all missing local repos'}).default(false),
31+
sync: z.boolean({description: 'dual of no-sync'}).default(true),
32+
'no-sync': z.boolean({description: 'opt out of gro sync'}).default(false),
3133
})
3234
.strict();
3335
export type Args = z.infer<typeof Args>;
@@ -39,7 +41,11 @@ export const task: Task<Args> = {
3941
Args,
4042
summary: 'gets gitops ready and runs scripts',
4143
run: async ({args, log, sveltekit_config, invoke_task}) => {
42-
const {path, dir, outdir = sveltekit_config.routes_path, download} = args;
44+
const {path, dir, outdir = sveltekit_config.routes_path, download, sync} = args;
45+
46+
if (sync) {
47+
await invoke_task('sync');
48+
}
4349

4450
const {local_repos} = await get_gitops_ready(path, dir, log, download);
4551

0 commit comments

Comments
 (0)